Chain several operations in mathematica

45 Views Asked by At

I have an implicit expression ((x-a)/a)^2+(y/b)^2=1. I want to find dy/dx. Mathematica should first solve Solve[((x - a)/a)^2/a^2 + y^2/b^2 == 1, y, MaxExtraConditions -> Automatic] and on the result do (d)/(dx)(y = (b sqrt(a^2-x^2))/a) = -(b x)/(a sqrt(a^2-x^2))

How do I chain it in a single expression?

1

There are 1 best solutions below

0
On BEST ANSWER

Mathematica has its own SE-site such that you can ask it over there. Anyway, it's a short code but next time you must go to the above mentioned site:

Clear[a, b, x, y];
D[y /. Solve[((x - a)/a)^2 + (y/b)^2 == 1, y], x]

Result:

{-((b Sqrt[2 a - x])/(2 a Sqrt[x])) + (b Sqrt[x])/(2 a Sqrt[2 a - x]),
  (b Sqrt[2 a - x])/(2 a Sqrt[x]) - (b Sqrt[x])/(2 a Sqrt[2 a - x])}