# Find the equation of the tangent line of the curve

Tags:
1. Mar 7, 2017

### Schaus

1. The problem statement, all variables and given/known data
Find the equation of the tangent line to the curve $\ xy^2 + \frac 2 y = 4$ at the point (2,1).
Answer says $\ y-1 = -\frac 1 2(x-2)$
And with implicit differentiation I should have gotten $\frac {dy} {dx}= -\frac {y^2} {2xy-\frac {2} {y^2}}$
2. Relevant equations
$\ y-y_1 = m(x-x_1)$

3. The attempt at a solution
$\ y-1 = m(x-2)$

$\frac d {dx}(xy^2+\frac 2 y) =\frac d {dx}(4)$

$\frac d {dx}(xy^2)+\frac d {dx}(\frac 2 y) = 0$

$2xy+x⋅\frac {dy} {dx}-\frac {2} {y^2}⋅ \frac {dy} {dx} = 0$

$x⋅\frac {dy} {dx}-\frac {2} {y^2}⋅ \frac {dy} {dx} = 2xy$

$\frac {dy} {dx}(x-\frac {2} {y^2})= 2xy$

$\frac {dy} {dx}= -\frac {2xy} {x-\frac {2} {y^2}}$
Subbing in my x and y values gives me a slope of 4.
If anyone can help show me what I did wrong, I would really appreciate it. Also this is the first time using LaTeX Primer so bare with me.

2. Mar 7, 2017

### FactChecker

Check this. It looks wrong to me.

3. Mar 7, 2017

### Schaus

$2xy+x⋅\frac {dy} {dx}-\frac {2} {y^2}⋅ \frac {dy} {dx} = 0$ is this supposed to be
$x +2xy⋅\frac {dy} {dx}-\frac {2} {y^2}⋅ \frac {dy} {dx} = 0$?

4. Mar 7, 2017

### FactChecker

Methodically applying the product rule to d/dx (x⋅y2) gives
d/dx (x⋅y2) = (d/dx x)⋅y2 + x⋅(d/dx y2) = 1⋅y2 + x⋅2⋅y⋅dy/dx = y2 + 2xy⋅dy/dx
I don't see this in your calculations.

5. Mar 7, 2017

### Schaus

So $\frac d {dx}(xy^2)+\frac d {dx}(\frac 2 y) = 0$ should turn into
$x\frac {d} {dx} (y^2)+ x⋅\frac d {dx} y^2- \frac 2 {y^2}(\frac {dy} {dx}) = 0$ because I don't see the derivative of $\frac 2 y$?

Last edited: Mar 7, 2017
6. Mar 8, 2017

### Staff: Mentor

This part -- $x\frac {d} {dx} (y^2)+ x⋅\frac d {dx} y^2$ -- is wrong. You are not applying the product rule correctly. You have written the same thing twice.

7. Mar 8, 2017

### Schaus

Ohhhh, I should have done this?
$\frac {d} {dx} (1⋅y^2)+\frac {dy} {dx}2y⋅x -\frac {dy} {dx} \frac 2 y^2= 0$
then I would get $-\frac {y^2} {2xy-\frac 2 {y^2}}$ ?

8. Mar 8, 2017

### Staff: Mentor

No, that's not it either. Here's how the product rule works.
$\frac {d} {dx} (f(x) g(x)) = \frac {d} {dx}(f(x)) \cdot g(x) + f(x) \cdot \frac {d} {dx}(g(x)) = f'(x)g(x) + f(x)g'(x)$
Let's start from the beginning.
$\frac {d} {dx} (xy^2) = (\frac {d} {dx} x) \cdot y^2 + x \frac {d} {dx}(y^2)$
Can you continue? You'll need to use the chain rule to evaluate the derivative on the right.

9. Mar 8, 2017

### Ray Vickson

No, that is even worse.

Go back to the beginning, and use the product rule carefully, doing it one step at a time. Check your work as you go along.

10. Mar 8, 2017

### Schaus

$\frac {d} {dx} x⋅y^2+\frac {dy} {dx}2y⋅x -\frac {dy} {dx} \frac 2 {y^2}= 0$
then I would get $-\frac {y^2} {2xy-\frac 2 {y^2}}$
I thought that I did the product rule.
f(x) = x
f'(x) = 1
g(x) = y2
g'(x) = 2y
I just did the product rule as f'g⋅g'f.
After the product rule I add the $\frac 2 y$ but the derivative of this turns it into $-\frac 2 {y^2}$? I can't seem to see what I've done wrong.

11. Mar 8, 2017

### Ray Vickson

It does not turn into $-2/y^2$, it turns into $-2 y'/y^2$.

12. Mar 8, 2017

### FactChecker

No. Don't forget that a change of x forces a change of y because of the initial equation. The chain rule gives g'(x) = 2y $\frac {dy} {dx}$
Same problem here. Use the chain rule and include $\frac {dy} {dx}$.

13. Mar 8, 2017

### Schaus

I think I'll just have to watch more videos on implicit differentiation because I'm lost.

14. Mar 8, 2017

### Schaus

Ok, let me see if I've done this properly. The product rule - $(x\frac{dy}{dx}⋅2xy)+(1⋅y^2)$. Now for the $\frac 2 y$ do I use the quotient rule?

15. Mar 8, 2017

### Ray Vickson

You could use the quotient rule, but it is a whole lot easier just to use the chain rule.

16. Mar 8, 2017

### Schaus

Ok so the chain rule is $f'((g(x))⋅g'(x)$, correct? I'm a little confused as to what I am subbing in where.

17. Mar 8, 2017

### Staff: Mentor

Here's the chain rule for the problem you're having, using Leibniz notation.
$\frac d{dx}(y^2) = \frac d {dy}(y^2) \cdot \frac{dy}{dx}$
Can you continue?

18. Mar 8, 2017

### FactChecker

You can use the derivative of a power and the chain rule to calculate 2/y.

2/y is really 2⋅y-1 and y is really a function of x, so it is 2⋅y(x)-1
Therefore $\frac {d} {dx}$(2/y)
= 2⋅$\frac {d} {dx}$(y(x)-1)
= 2⋅(-1)y(x)-2⋅y'(x)
= (-2/y2)⋅$\frac {dy} {dx}$

19. Mar 9, 2017

### cristo

Staff Emeritus
It helps if you try to understand why you are doing what you are doing.

So, to differentiate $\frac{2}{y}$ with respect to x, you want to first differentiate with respect to y: $\frac{d}{dy}\Big(\frac{2}{y}\Big)$ and then multiply by dy/dx. So you have $\frac{d}{dx}\Big(\frac{2}{y}\Big)=\frac{d}{dy}\Big(\frac{2}{y}\Big)\cdot\frac{dy}{dx}$

20. Mar 9, 2017

### Schaus

Ohhh ok so it should look something like this?

$\frac {d}{dx}(xy^2+\frac 2 y )= \frac d {dx}(4)$
$\frac {d}{dx}(xy^2)+\frac d{dx}\frac 2 y=0$
$(x\frac d{dx}⋅2xy)+(1⋅y^2)+(\frac d{dx}\frac 2 y )= 0$
$2xy⋅\frac {dy}{dx}+y^2-\frac 2 {y^2}⋅\frac {dy}{dx}=0$
$\frac {dy}{dx}(2xy- \frac 2 {y^2}) = -y^2$
$\frac {dy}{dx} = - \frac {y^2} {2xy- \frac 2 {y^2}}$
Have I done this correctly?