# Evaluating $\frac{dg}{dθ}$ at $(r,θ)=(2\sqrt{2},\frac{π}{4})$ where $g(x,y)=\frac1{x+y^2}$ using chain rule?

Okay so my first step is to find the partial derivatives:

$$\frac{\partial \:}{\partial \:x}\left(\frac{1}{x+y^2}\right)=-\frac{1}{\left(x+y^2\right)^2}$$ $$\frac{\partial \:}{\partial \:y}\left(\frac{1}{x+y^2}\right)=-\frac{2y}{\left(x+y^2\right)^2}$$

Then I multiply each partial derivative with its respective equal and add it together:

$$(fx)(32r\cos(\theta)) + (fy)(3r(\sin(\theta))$$

Then I sub in X and Y in the partial derivatives. And then plug in $$r$$ and $$\theta$$:

$$-\left(\frac{1}{\left(32\left(2\sqrt{2}\right)cos\left(\frac{\pi \:}{4}\right)+\left(3\left(2\sqrt{2}\right)sin\left(\frac{\pi }{4}\right)\right)^2\right)^2}\right)\left(32\left(2\sqrt{2}\right)cos\left(\frac{\pi \:}{4}\right)\right)+-\left(\frac{2\left(3\left(2\sqrt{2}\right)sin\left(\frac{\pi \:}{4}\right)\right)}{\left(32\left(2\sqrt{2}\right)cos\left(\frac{\pi \:\:}{4}\right)+\left(3\left(2\sqrt{2}\right)sin\left(\frac{\pi \:}{4}\right)\right)^2\right)^2}\right)\left(3\left(2\sqrt{2}\right)sin\left(\frac{\pi \:}{4}\right)\right)$$

And I show my answer in the screenshot above. But for some reason the software is telling me it's wrong. I've also tried not multiplying the partial derivatives by the $$32rcos(\theta)$$ thing but it's still giving me the wrong answer.

What am I doing wrong? Thank you.

• Your $x_\theta$ and $y_\theta$ terms don't make sense. Why did you put $32r\cos\theta$, etc? Oct 3, 2020 at 19:11
• @NinadMunshi I got rid of them too but the answer is still wrong Oct 3, 2020 at 19:14
• Except getting rid of them is not correct. What is the formula for chain rule in 2 variables? Oct 3, 2020 at 19:15

It is easier if you substitute $$x$$ and $$y$$ directly $$g(r,\theta)=\frac{1}{x+y^2}=\frac{1}{32r\cos(\theta)+9r^2\sin^2(\theta)}$$

So $$\frac{\partial g}{\partial \theta}=-\frac{-32r\sin(\theta)+18r^2\sin(\theta)\cos(\theta)}{(32r\cos(\theta)+9r^2\sin^2(\theta))^2}.$$

Or $$\frac{\partial g}{\partial \theta}=\frac{\partial g }{\partial x}\frac{\partial x}{\partial \theta}+\frac{\partial g }{\partial y}\frac{\partial y}{\partial \theta}$$ $$=-\frac{1}{(x+y^2)^2}(-32r\sin(\theta)+2y(3r\cos(\theta)))$$ $$=\frac{32r\sin(\theta)-18r^2\sin(\theta)\cos(\theta)}{(32r\cos(\theta)+9r^2\sin^2(\theta))^2}.$$

Then evaluating at $$(r,\theta)=(2\sqrt{2},\frac{\pi}{4})$$ you should get $$-\frac{1}{1250}$$.

• OMG ares <333333 thank you Oct 3, 2020 at 19:18

We have that

$$\frac{\partial g}{\partial \theta}=\frac{\partial g}{\partial x}\frac{\partial x}{\partial \theta}+\frac{\partial g}{\partial y}\frac{\partial y}{\partial \theta}=-\frac{1}{\left(x+y^2\right)^2}(-32 r \sin \theta)-\frac{2y}{\left(x+y^2\right)^2}(3r\cos \theta)=$$

with $$x=64$$ and $$y=6$$ then

$$=-\frac{1}{100^2}(-64)-\frac{12}{100^2}(6)=-\frac{8}{100^2}$$

• Woah that's interesting. whered you get 64 from? thanks again btw! Oct 3, 2020 at 19:18
• @DoctorReality We have $$x=32r\cos \theta = 32\cdot 2\sqrt 2 \cdot \frac 1{\sqrt 2}=64$$
– user
Oct 3, 2020 at 19:19
• OOOOOOOOOOOOOOOOH! I shoulda done that Oct 3, 2020 at 19:20
• @DoctorReality We don't need to find a general expression for the derivative, after the first step it suffices to plug in the values for the given point.
– user
Oct 3, 2020 at 19:21