Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Implicit Differentiation

  1. Aug 15, 2008 #1
    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) [tex]y^5 +x^2 y^3 = 1+xy[/tex]

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

    3. The attempt at a solution

    a) [tex]y^5 +x^2 y^3 = 1+xy[/tex]

    [tex]5y^4+x^2 3y^2+2xy^3 \frac{dy}{dx} = x + y[/tex]

    [tex]\frac{dy}{dx} = \frac{x+y}{5y^4 +x^2 3y^2 +2xy^3}[/tex]

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

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

    we must use the quotient rule;

    f = [tex]x^{3/2}\sqrt{7x^2 +1}[/tex]

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

    g = [tex]sin(x) e^{3x^2 + 2x}[/tex]

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

    [tex] \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} [/tex]

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

  2. jcsd
  3. Aug 15, 2008 #2


    User Avatar
    Homework Helper

    Let's start with the first one:

    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

    [tex](5y^4 + x^2 \cdot 3y^2 + 2xy^3) \cdot \frac{dy}{dx} [/tex] .

    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.
  4. Aug 15, 2008 #3
    Oh oh oh, I understand! :wink:

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

    Thanks. No, what is logarithmic differentiation? How do I do that?
  5. Aug 16, 2008 #4


    User Avatar
    Homework Helper

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

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

    = 1 \cdot y + x \cdot \frac{dy}{dx}[/tex]

    So you also have a term involving [tex]\frac{dy}{dx}[/tex] 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

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

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

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

    y being your original function.

    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
  6. Aug 16, 2008 #5
    So, in (a) that's where I'm stuck atm,

    [tex](5y^4 + x^2 \cdot 3y^2 + 2xy^3) \cdot \frac{dy}{dx} = y + x \frac{dy}{dx}[/tex]

    I don't know how exactly I should rearrange this to find a correct expression for dy/dx
  7. Aug 16, 2008 #6


    User Avatar
    Homework Helper

    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:

    [tex](5y^4 + x^2 3y^2 + 2xy^3) \cdot \frac{dy}{dx} = y + x \cdot \frac{dy}{dx}[/tex]

    (5y^4 + x^2 3y^2 + 2xy^3 - x) \cdot \frac{dy}{dx} = y [/tex]

    then solve for dy/dx:

    \frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x} [/tex]

    [And we'll see if this works: PF seems to be gagging on LaTeX syntax just now...]
    Last edited: Aug 16, 2008
  8. Aug 16, 2008 #7
    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.)
  9. Aug 16, 2008 #8

    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 =

  10. Aug 16, 2008 #9
    Hi, but we just worked out that the right answer has to be: [tex] \frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x} [/tex] 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 [tex] \frac{dy}{dx} = \frac{y}{5y^4 + 3x^2 y^2 + 2xy^3 - x} [/tex] defined?
    Hmm, where the denominator isn't zero, that is: When either x or y = 0
  11. Aug 16, 2008 #10
    Sorry, there is some problem with my syntax and one semantic error that I have found.

    if given f(x,y)

    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
  12. Aug 17, 2008 #11


    User Avatar
    Homework Helper

    That won't be quite right. The derivative will be undefined on the curve described by [tex]5y^4 + 3x^2 y^2 + 2xy^3 - x = 0[/tex], 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, [tex]y^5 +x^2 y^3 = 1+xy[/tex] , 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
  13. Aug 21, 2008 #12
    Hmm, could you please show me how to do (b) using the "logarithmic differentiation" now, like you mentioned before?
  14. Aug 21, 2008 #13


    User Avatar
    Homework Helper

    Here's the original function:

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

    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})[/tex]

    [tex]= \frac{3}{2} \cdot ln x \, + \, \frac{1}{2} \cdot ln(7x^2 +1) \, - \, ln(sin(x)) \, - \, (3x^2 + 2x)[/tex]

    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)[/tex]

    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)] [/tex]

    = [\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
  15. Aug 21, 2008 #14
    Thanks for your very educational post. :smile:

    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?
  16. Aug 21, 2008 #15


    User Avatar
    Homework Helper

    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 [tex]\surd(7x^2+1)[/tex] 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"...
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook