# How do you calculate the derivative after a change of variables?

How would you calculate $df \over dθ$ if $f(x,y) = x^2+y^2$ where $x = \sin 2θ$ and $y = \cos 2θ$?

I tried Wolfram and using the product rule but I can't seem to get anywhere.

-
First, rewrite f(x,y) in terms of f(θ). Then apply chain rule –  user2612743 Jan 11 at 21:52
Did you mean $\sin^2\theta$ or $\sin 2\theta$? –  Michael Hardy Jan 11 at 21:56
Note $f$ simplifies nicely. –  David Mitra Jan 11 at 22:01
Consider using MathJax on this website. –  Student Jan 11 at 22:02
Did you mean $x2$ or $x^2$? –  Student Jan 11 at 22:03
add comment

## 3 Answers

More basic than the chain rule:

$f(x(\theta),y(\theta)) = \sin^2(2\theta)+\cos^2(2\theta) = 1$, so $\frac{df}{d\theta} = \frac{d}{d\theta} (1) = 0$

-
add comment

Chain rule: $$\frac{\partial f}{\partial\theta} = \frac{\partial f}{\partial x}\cdot\frac{\partial x}{\partial\theta} + \frac{\partial f}{\partial y}\cdot\frac{\partial y}{\partial\theta}.$$

PS: The question qas edited after I posted this, stating that $f(x,y)=x^2+y^2$. That of course makes it much simpler than if a different function had been involved, since one of the Pythagorean identities of trigonometry simplifies it.

-
add comment

Here is a worked through answer using the the chain rule, although I would suggest Steven's approach is best:

$$\frac{df}{d\theta} = \frac{\partial f}{\partial x}\frac{dx}{d\theta} + \frac{\partial f}{\partial y}\frac{dy}{d\theta}$$

So

$$\frac{\partial f}{\partial x} = 2x \quad \frac{\partial f}{\partial y} = 2y$$

$$\frac{dx}{d\theta} = 2cos 2\theta \quad \frac{y}{d\theta} = -2sin2\theta$$

\begin{align*} \frac{df}{d\theta} & = 4xcos2\theta - 4y sin2\theta\\ & = 4sin2\theta cos2\theta - 4cos2\theta sin2\theta \\ & = 0 \end{align*}

-
It may be easier to use commutativity of multiplication of multiplication instead of a trig identity on the third line up. –  Steven Gubkin Jan 11 at 22:51
Thanks Steven, not sure how I missed that! –  Daniel Jan 11 at 22:59
add comment