# how to derivate an equation of x and y without taking any variable constant?

2 views (last 30 days)
Ahmed Mujtaba on 3 Dec 2022
Edited: Sam Chak on 3 Dec 2022
y-x*y-sin(y)==0
i tried many times but i cant get the required ans. d/dx on given equation without taking x or y constant.

John D'Errico on 3 Dec 2022
Specify that y is a function of x. You o so like this:
syms y(x)
Now you can differentiate that expression with respect to x. See the help for diff.
Ahmed Mujtaba on 3 Dec 2022
tried that but didnt work the ans should be
y/1-x-cos(y)
you can try if you get this ans please let me know

Torsten on 3 Dec 2022
You mean assuming y = y(x) ?
syms y(x)
f = y-x*y-sin(y) == 0;
df = diff(f,x)
df(x) = Ahmed Mujtaba on 3 Dec 2022
tried that but didnt work the ans should be
y/1-x-cos(y)
you can try if you get this ans please let me know

Sam Chak on 3 Dec 2022
Edited: Sam Chak on 3 Dec 2022
It can be confusing because the math structure of y/1 - x - cos(y) is legitimately interpreted as .
Guess you probably want something like this.
syms y(x)
F = y - x*y - sin(y) == 0;
dF = diff(F, x)
dF(x) = DE = isolate(dF, diff(y, x))
DE = 