# Derivatives of trigonometric functions

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]?

• So what you want is basically D[3*(Cos[t1])^2 - 1, t1]/D[x1 + y Cot[t1], t1], no? Feb 4 at 13:05
• @J.M. I don't understand your point. I just want to simplify the result by appearing sin(t1). Feb 4 at 13:08
• ...and the result of the snippet I gave has Sin[t1] in it; I merely used the chain rule manually. Feb 4 at 13:10
• 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. Feb 4 at 13:15
• "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). Feb 4 at 13:19

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!