I was required to find the derivative of $2\sqrt{\cot(x^2)}$.
My solution
I can't find any mistake in my solution but in my book following solution is given:
Of course my answer and the answer in book are not same(I have plotted the graph of both and they don't overlap).
I understand the solution given in my book.
I'm asking for help to figure out where I have made mistake in my solution.


I still think the two answers are identical. Maybe there is something wrong with your plot ;) (If I haven't misread your writing, that is...)
$$ \frac{-2x csc^2(x^2)}{\sqrt{cot(x^2)}} = \frac{-2x \left(\frac{1}{sin^2(x^2)} \right)}{\sqrt{\frac{cos(x^2)}{sin(x^2)}}} = \frac{-2x}{sin(x^2) \sqrt{sin(x^2)cos(x^2)}} = ... $$ Then proceed as in the given answer.