Basic differentiation problem using multiple rules

$$\text{Find}~ \frac{\,dy}{\,dx}~, \qquad \text{where}~~y =\frac{\sqrt{2x^2}}{\cos x}$$

Here's the basic question. The solutions suggest to use the quotient rule for the top half and bottom half and to use the chain rule on the top half of the fraction.

My idea was to simplify the top half of the fraction to $$\sqrt{2}\sqrt{x^2} = \sqrt{2}\cdot{x}$$

However, after doing this I only use the quotient rule and my answer ends up being totally different from the solution.

Where exactly have I gone wrong? Is the first step incorrect?

The solution is: $$\frac{2x\cos (x)+2x^2\sin(x)}{\sqrt{2x^2}\cos^2(x)}$$

My workings were like this: $$u = \sqrt{2x^2}=\sqrt2\cdot x \\ u' = \sqrt{2} \\v = \cos x \\ v'=-\sin x \\$$

Then I apply the quotient rules and end up with: $$\frac{\,dy}{\,dx}=\frac{\cos x + x\cdot \sin x}{\sqrt{2}\cdot \cos ^2x}$$

• It would be helpful to show what your answer is, and what the actual answer is. – Larry Apr 18 at 10:52
• You cannot make that move if $x$ is negative. – Randall Apr 18 at 11:04
• Thanks a lot for the guidance Larry, I've just implemented your suggestions. – JKong Apr 18 at 11:04
• Cheers @Randall I see the error now – JKong Apr 18 at 11:11