# Solve for derivative from multiple equations

I'm trying to solve for the derivative of [Psi] with respect to [Theta] from these two equations:

Eqn1a = R*Cos[Subscript[\[Psi], 1][\[Theta]]] == Subscript[x, 0] + p[\[Theta]]*Cos[\[Theta]]
Eqn1b = R*Sin[Subscript[\[Psi], 1][\[Theta]]] == Subscript[y, 0] + p[\[Theta]]*Sin[\[Theta]]


I want to find the derivative in terms of x_0, y_0 and [Theta]. In other words, I want to eliminate the variables p and the derivative of p. I've tried differentiating both equations and then using Solve but I've been unsuccessful.

Eqn1aD = D[Eqn1a, \[Theta]]
Eqn1bD = D[Eqn1b, \[Theta]]
sol = Solve[{Eqn1a, Eqn1b},Derivative[Subscript[\[Psi], 1]][\[Theta]]]

• Jan 31 at 20:46
• I don't think you can get a "nice" solution for them. It appears that psi' satisfies a fourth degree polynomial in the parameters. But maybe I'm missing some simplifications somewhere along the way. Jan 31 at 23:52
• @DanielLichtblau I've actually done this problem by hand and it is solvable. It boils down into a quadratic, not a quartic. I'm using Mathematica as confirmation of my answer. I'm very new to Mathematica. Can you help me with the code? Thanks so much :) Feb 1 at 6:25

I am not sure that I understood you completely. For example, is it OK with you if one solves the initial system with respect to Psi1(theta) and p(theta) and then finds the derivative of Psi1(theta)? If it is OK, try the following:

sol = Solve[{Eqn1a, Eqn1b}, {Subscript[\[Psi], 1][\[Theta]],p[\[Theta]]}] /. C -> 0 // Simplify;

expr=D[sol[[1, 2, 2]], \[Theta]] // Simplify


with the following effect: The same operation one can apply to the second solution.

Edit The result has already been simplified. However, addressing the question of @Matthew James one can customize the resulting expression assuming that the expression staying under the radical is positive:

Map[Simplify[#, {R^2 Cos[\[Theta]]^2 (R^2 - Sin[\[Theta]]^2
\!$$\*SubsuperscriptBox[\(x$$, $$0$$, $$2$$]\) +
Sin[2 \[Theta]] Subscript[x, 0] Subscript[y, 0] -
Cos[\[Theta]]^2
\!$$\*SubsuperscriptBox[\(y$$, $$0$$, $$2$$]\)) > 0, R > 0}] &,
expr // Expand] // Simplify


The latter result is easier to look at if I post it as an image: Have fun!

• It works, thank you :) Feb 1 at 13:10
• I have a small follow-up question, if that's ok? How can I tell mathematica to simplify this fraction? The sqrt() term exists in both numerator and denominator so I'd like to write it as 1 + [stuff]/sqrt[stuff]. I've tried using Simplify and Together and Apart but with no luck. Feb 3 at 14:52
• @Matthew James, Please see the edit. Feb 3 at 15:17
• Perfect, thank you! Feb 3 at 15:20