# Implicit Differentiation

1. Aug 15, 2008

### roam

Hello! I need some help here please for ppl who are familiar with implicit differentiation.

Use implicit differentiation to find dy/dx, in each case say where it is defined;

a) $$y^5 +x^2 y^3 = 1+xy$$

b) $$y= \frac{x^{3/2}\sqrt{7x^2 +1}}{sin(x) e^{3x^2 + 2x}}$$, $$x \neq n\pi$$ n $$\in$$ Z

3. The attempt at a solution

a) $$y^5 +x^2 y^3 = 1+xy$$

$$5y^4+x^2 3y^2+2xy^3 \frac{dy}{dx} = x + y$$

$$\frac{dy}{dx} = \frac{x+y}{5y^4 +x^2 3y^2 +2xy^3}$$

Is that right? what does it mean "say where it is defined"?

b) $$y= \frac{x^{3/2}\sqrt{7x^2 +1}}{sin(x) e^{3x^2 + 2x}}$$

we must use the quotient rule;

f = $$x^{3/2}\sqrt{7x^2 +1}$$

f' = $$x^{3/2} . -\frac{14x}{-2\sqrt{7x^2 +1}}+ \sqrt{7x^2 +1} .\frac{2}{3}x^{1/2}$$ (using the product rule)

g = $$sin(x) e^{3x^2 + 2x}$$

g' = $$sin(x).6x+2e^{3x^2 + 2x} + e^{3x^2 + 2x} . cos (x)$$ (using the product rule again)

$$\frac{sin(x) e^{3x^2 + 2x} . x^{3/2} . -\frac{14x}{-2\sqrt{7x^2 +1}}+ \sqrt{7x^2 +1} .\frac{2}{3}x^{1/2} - (x^{3/2}\sqrt{7x^2 +1}) . (sin(x).6x+2e^{3x^2 + 2x} + e^{3x^2 + 2x} . cos (x))}{(sin(x) e^{3x^2 + 2x})^2}$$

Any suggestions on what I should do next? This looks very messy!

2. Aug 15, 2008

### dynamicsolo

Don't forget that y is some unspecified function of x, so any expression involving y must be differentiated using the Chain Rule on y. I'm presuming that you mean to have the entire left side factored as

$$(5y^4 + x^2 \cdot 3y^2 + 2xy^3) \cdot \frac{dy}{dx}$$ .

So be careful also on the right-hand side: the derivative of xy is not handled correctly there.

Both of these problems involve a quotient as the expression of dy/dx, so they are defined wherever the denominators are not zero.

For part(b), have you learned about logarithmic differentiation yet? It is a corollary topic to implicit differentiation and really makes such expressions easier to differentiate than attempting to deal with them through the Quotient Rule.

3. Aug 15, 2008

### roam

Oh oh oh, I understand!

Why? xy is a product and therefore applying the product rule yields, if f=x f'=1 & if g=y g'=1
=> x+y
:uhh:

Thanks. No, what is logarithmic differentiation? How do I do that?

4. Aug 16, 2008

### dynamicsolo

But y is a function, so it must be differentiated with respect to x:

$$\frac{d}{dx} xy = [ (\frac{d}{dx} x) \cdot y ] + [ x \cdot (\frac{d}{dx} y) ] = 1 \cdot y + x \cdot \frac{dy}{dx}$$

So you also have a term involving $$\frac{dy}{dx}$$ on the right-hand side.

(I was a little surprised by what you'd done on the right, since you'd done the left side correctly...)

What makes it logarithmic is that you take the natural logarithm of both sides of the equation first and then implicitly differentiate the result with respect to x. The result is

ln y = [set of terms which are logarithms of parts of the original expressions],

which you then differentiate to get

$$\frac{d}{dx}ln y = \frac{d}{dx}$$[set of logarithmic terms]

$$\rightarrow \frac{1}{y} \cdot \frac{dy}{dx} =$$[set of terms differentiated using Chain Rule]

$$\rightarrow \frac{dy}{dx} = y \cdot$$[set of terms differentiated using Chain Rule]

The result is still going to be messy, but the mechanics are often easier to carry out than using the Quotient Rule.

BTW, in your work for (b), I believe that should be

$$f' = x^{3/2} . \frac{14x}{2\sqrt{7x^2 +1}}+ \sqrt{7x^2 +1} .\frac{3}{2}x^{1/2}$$

This seems to be all right:

$$g' = sin(x) \cdot (6x+2) \cdot e^{3x^2 + 2x} + e^{3x^2 + 2x} \cdot cos (x)$$

Otherwise, you just have to do the simplification. The result is going to be messy: it's an ugly function! [It's what I call a "math course function". You practically never see such things in real physical models; they are invented solely to make students practice their technique...]

Last edited: Aug 16, 2008
5. Aug 16, 2008

### roam

So, in (a) that's where I'm stuck atm,

$$(5y^4 + x^2 \cdot 3y^2 + 2xy^3) \cdot \frac{dy}{dx} = y + x \frac{dy}{dx}$$

I don't know how exactly I should rearrange this to find a correct expression for dy/dx

6. Aug 16, 2008

### dynamicsolo

In completing the work from implicit differentiation, bring all the terms involving dy/dx to one side of the equation and everything else to the other:

$$(5y^4 + x^2 3y^2 + 2xy^3) \cdot \frac{dy}{dx} = y + x \cdot \frac{dy}{dx}$$

$$\rightarrow (5y^4 + x^2 3y^2 + 2xy^3 - x) \cdot \frac{dy}{dx} = y$$

then solve for dy/dx:

$$\rightarrow \frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x}$$

[And we'll see if this works: PF seems to be gagging on LaTeX syntax just now...]

Last edited: Aug 16, 2008
7. Aug 16, 2008

### roam

LoL why isn't the LaTeX working? I have to wait (sigh)...

Thanks, and btw, do you know how to use packages such as mathematica or perhaps matlab? Is it possible to differentiate implicitly using those programs?...how about some more complicated functions such as (b)?

I think the commad is D[f, x] (->dy/dx; i.e., w.r.t x)

(It could be a good way for checking the answers.)

8. Aug 16, 2008

### rootX

matlab:

see if this works ..

>> syms x, syms y;
>> f = y^5+x^2*y^3-1-x*y;
>> diff_f_y = diff(f,y);
>> diff_f_x = diff(f,x);
>> diff_y_x = (1/diff_f_y)*diff_f_x

diff_y_x =

1/(5*y^4+3*x^2*y^2-x)*(2*x*y^3-y)

9. Aug 16, 2008

### roam

Hi, but we just worked out that the right answer has to be: $$\frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x}$$ NOT 1/(5*y^4+3*x^2*y^2-x)*(2*x*y^3-y) !! What's the problem with Matlab?

And where is $$\frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x}$$ defined?
Hmm, where the denominator isn't zero, that is: When either x or y = 0

10. Aug 16, 2008

### rootX

Sorry, there is some problem with my syntax and one semantic error that I have found.

First
if given f(x,y)

then
dy/dx = - {df/dx}/{df/dy}
I found this in my calculus course

now, using my syntax, matlab would give df/dx and df/dy

syms x; declares variable
f = x^2+... ; declares function
diff(f,x); differentiates
and I was just using that above formula (without minus) to get dy/dx but it didn't work

I will look into this

This is the problem:

>> f = x^2+y^2-25;
>> df_dx = diff(f,x);
>> df_dy = diff(f,y);
>> dy_dx = -(df_dx)/(df_dy)

dy_dx =

-1/y*x <------- no clue!

>> dy_dx = -(df_dy)/(df_dx)

dy_dx =

-y/x <----- this looks right

11. Aug 17, 2008

### dynamicsolo

That won't be quite right. The derivative will be undefined on the curve described by $$5y^4 + 3x^2 y^2 + 2xy^3 - x = 0$$, provided the numerator is not also zero there (a point I should have made earlier). At the origin, both the numerator and denominator are zero, so dy/dx is given by the indeterminate ratio 0/0, which may be zero, a non-zero finite number, or infinity. We would need to take a limit approaching the origin to find out which (not something I want to do just now).

Also, when y = 0, but the denominator is not zero, the curve described by the original relation, $$y^5 +x^2 y^3 = 1+xy$$ , will have a horizontal tangent. For x = 0, where the denominator is not zero, the slope is given by 1/(5·y^3) .

In problems given to beginning calculus students, though, they are usually just given coordinates for a specific point (x,y) and asked to find the slope there, because many of the relations chosen are too messy to solve for particular values of x or y. It can sometimes be difficult to characterize just where the curve described by the relation has horizontal or vertical tangents.

Last edited: Aug 17, 2008
12. Aug 21, 2008

### roam

Hmm, could you please show me how to do (b) using the "logarithmic differentiation" now, like you mentioned before?

13. Aug 21, 2008

### dynamicsolo

Here's the original function:

$$y= \frac{x^{3/2}\sqrt{7x^2 +1}}{sin(x) e^{3x^2 + 2x}}$$

Take the natural logarithm of both sides:

$$ln y= \frac{3}{2} \cdot ln x \, + \, \frac{1}{2} \cdot ln(7x^2 +1) \, - \, ln(sin(x)) \, - \, ln(e^{3x^2 + 2x})$$

$$= \frac{3}{2} \cdot ln x \, + \, \frac{1}{2} \cdot ln(7x^2 +1) \, - \, ln(sin(x)) \, - \, (3x^2 + 2x)$$

Then differentiate both sides with respect to x (keeping in mind that y is a function of x):

$$\frac{1}{y} \cdot \frac{dy}{dx} = \frac{3}{2} \cdot \frac{1}{x} \, + \, \frac{1}{2} \cdot \frac{1}{7x^2 +1} \cdot (14x) \, - \, \frac{1}{sin(x)} \cdot [cos(x)] \, - \, (6x + 2)$$

You could put the right-hand side over a common denominator at this point (though, nothing is really going to "pretty up" this result...). You now "solve" for dy/dx by multiplying both sides by y (which is your original function):

$$\frac{dy}{dx} = y \, \cdot \, [\frac{3}{2x} \, + \, \frac{7x}{7x^2 +1} \, - \, cot(x) \, - \, (6x + 2)]$$

$$= [\frac{3}{2x} \, + \, \frac{7x}{7x^2 +1} \, - \, cot(x) \, - \, (6x + 2)] \, \cdot \, (\frac{x^{3/2}\sqrt{7x^2 +1}}{sin(x) e^{3x^2 + 2x}})$$

I think you could just leave it this way if you were given this as an exam problem: it will be easier for the grader to see what you did and "simplifying" this expression won't really make it much easier to think about...

Now, where is this derivative defined? (I'll let you think about that a bit...)

Last edited: Aug 21, 2008
14. Aug 21, 2008

### roam

Thanks for your very educational post.

I believe the derivative is defined where x does not equal zero because we don't want devision by zero -- it is defined where the denominator doesn't equal zero. Isn't it?

15. Aug 21, 2008

### dynamicsolo

And also where sin(x) = 0 , so the derivative is undefined at all integer multiples of pi (as was the case with the function itself). There are no other domain issues with this function, since $$\surd(7x^2+1)$$ is always defined, as the argument is always positive, and the exponential term is also always positive. But be careful to check for such things when asked about the domain of a function or its derivatives: sometimes there's more at risk than just "division by zero"...