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[1][Subscript[\[Psi], 1]][\[Theta]]]
  • 2
    $\begingroup$ Just FYI: Point #3: Avoid subscripted variables $\endgroup$
    – Michael E2
    Jan 31, 2023 at 20:46
  • $\begingroup$ 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. $\endgroup$ Jan 31, 2023 at 23:52
  • $\begingroup$ @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 :) $\endgroup$ Feb 1, 2023 at 6:25

1 Answer 1


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[1] -> 0 // Simplify;

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

with the following effect:

enter image description here

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] - 
\!\(\*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:

enter image description here

Have fun!

  • $\begingroup$ It works, thank you :) $\endgroup$ Feb 1, 2023 at 13:10
  • $\begingroup$ 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. $\endgroup$ Feb 3, 2023 at 14:52
  • 1
    $\begingroup$ @Matthew James, Please see the edit. $\endgroup$ Feb 3, 2023 at 15:17
  • $\begingroup$ Perfect, thank you! $\endgroup$ Feb 3, 2023 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.