# Ivan's question at Yahoo! Answers regarding finding the line tangent to an implicitly defined curve

#### MarkFL

Staff member
Here is the question:

how to slove for y? ln(xy) + 2x - y + 1 =0?

I cant figure it out.

In order to find the equation of the tangent line at (1/2, 2)

I got as far a ln(x) + 2x +1 = y - ln(y)
I have posted a link there to this topic so the OP can see my work.

#### MarkFL

Staff member
Re: Ivan's question at Yahoo! Answers regarding finding the line tangent to an implicitly defined ci

Hello Ivan,

We are given the implicitly defined curve:

$$\displaystyle \ln(xy)+2x-y+1=0$$

and are asked to find the equation of the line tangent to this curve at the point:

$$\displaystyle (x,y)=\left(\frac{1}{2},2 \right)$$

The first thing I like to do is verify that in fact the given point lies on the curve. So, if we substitute for $x$ and $y$ into the equation of the curve, we find:

$$\displaystyle \ln\left(\frac{1}{2}\cdot2 \right)+2\left(\frac{1}{2} \right)-2+1=0$$

$$\displaystyle \ln(1)+1-2+1=0$$

$$\displaystyle 0+1-2+1=0$$

$$\displaystyle 0=0$$

So, the given point is on the curve. Next, let's use the logarithmic property:

$$\displaystyle \log_a(bc)=\log_a(b)+\log_a(c)$$

to rewrite the equation of the curve to make implicit differentiation easier:

$$\displaystyle \ln(x)+\ln(y)+2x-y+1=0$$

Now, implicitly differentiate with respect to $x$:

$$\displaystyle \frac{1}{x}+\frac{1}{y}\frac{dy}{dx}+2-\frac{dy}{dx}=0$$

We want to solve for $$\displaystyle \frac{dy}{dx}$$, so let's move all terms not involving this to the right side:

$$\displaystyle \frac{1}{y}\frac{dy}{dx}-\frac{dy}{dx}=-\frac{1}{x}-2$$

Multiply through by $-1$ and factor out $$\displaystyle \frac{dy}{dx}$$ on the left side:

$$\displaystyle \frac{dy}{dx}\left(1-\frac{1}{y} \right)=\frac{1}{x}+2$$

Combine terms:

$$\displaystyle \frac{dy}{dx}\left(\frac{y-1}{y} \right)=\frac{2x+1}{x}$$

Multiply through by $$\displaystyle \frac{y}{y-1}$$:

$$\displaystyle \frac{dy}{dx}=\frac{(2x+1)y}{x(y-1)}$$

To get the slope of the tangent line, we need to evaluate this for:

$$\displaystyle (x,y)=\left(\frac{1}{2},2 \right)$$

Hence:

$$\displaystyle m=\left.\frac{dy}{dx}\right|_{(x,y)=\left(\frac{1}{2},2 \right)}=\frac{\left(2\left(\frac{1}{2} \right)+1 \right)2}{\frac{1}{2}(2-1)}=\frac{4}{\frac{1}{2}}=8$$

Now, we have the slope, and a point on the line, so using the point-slope formula, we find the tangent line is given by:

$$\displaystyle y-2=8\left(x-\frac{1}{2} \right)$$

Arranging this in slope-intercept form, we obtain:

$$\displaystyle y=8x-2$$