0
$\begingroup$

Let's use the following sample case

Clear["Global`*"];

t1 = ArcTan[y/(x - x1)];
f = (3*(Cos[t1])^2 - 1);

der = D[f, x]

which gives

(6 y^2)/((x - x1)^3 (1 + y^2/(x - x1)^2)^2)

My question is: how can we simplify the result since some parts of the resulted equation correspond to the trigonometric function Sin[t1]?

$\endgroup$
7
  • 1
    $\begingroup$ So what you want is basically D[3*(Cos[t1])^2 - 1, t1]/D[x1 + y Cot[t1], t1], no? $\endgroup$
    – J. M.'s torpor
    Feb 4 at 13:05
  • $\begingroup$ @J.M. I don't understand your point. I just want to simplify the result by appearing sin(t1). $\endgroup$
    – Vaggelis_Z
    Feb 4 at 13:08
  • $\begingroup$ ...and the result of the snippet I gave has Sin[t1] in it; I merely used the chain rule manually. $\endgroup$
    – J. M.'s torpor
    Feb 4 at 13:10
  • 1
    $\begingroup$ Consider the function f which you differentiate.This is NOT a trigonometric function, and hence I do not understand why you are expecting Mathematica to do something like that for you. $\endgroup$ Feb 4 at 13:15
  • 2
    $\begingroup$ "Function f contains Cos" - but composing it with ArcTan yields an algebraic function. So, you'd need to take a different route (like in my first comment). $\endgroup$
    – J. M.'s torpor
    Feb 4 at 13:19
1
$\begingroup$

If I understand correctly, the use of "Simplify" is here misleading. I guess that you would like to make variables change. If so, try the following:

Step 1:

t1 = ArcTan[y/(x - x1)];
f = (3*(Cos[t1])^2 - 1);
der = D[f, x]
(*  (6 y^2)/((x - x1)^3 (1 + y^2/(x - x1)^2)^2)  *)

Step 2:

rule = y -> (x - x1)*Tan[t];
der2=Simplify[der /. rule, t \[Element] Reals]

(* (6 Cos[t]^2 Sin[t]^2)/(x - x1) *)

Then you may still transform it into a few other forms if you find them advantageous. For example,

TrigReduce[der2]

(*  -((3 (-1 + Cos[4 t]))/(4 (x - x1)))  *)

or

TrigToExp[der2] // Together

(*  -((3 E^(-4 I t) (-1 + E^(4 I t))^2)/(8 (x - x1)))  *)

Or like this:

rule2 = Cos[t] -> Sin[2 t]/(2 Sin[t]);

(6 Cos[t]^2 Sin[t]^2)/(x - x1) /. rule2

(*  (3 Sin[2 t]^2)/(2 (x - x1))   *)

I hope that's what you are after.

Have fun!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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