Calculus · real student question

Find both first partial derivatives of z = ln( (x - sqrt(x^2 - y^2)) / (x + sqrt(x^2 - y^2)) ).

Question

Find both first partial derivatives zx\dfrac{\partial z}{\partial x} and zy\dfrac{\partial z}{\partial y} of

z=ln ⁣(xx2y2x+x2y2)z=\ln\!\left(\frac{x-\sqrt{x^2-y^2}}{x+\sqrt{x^2-y^2}}\right)

Step-by-step solution

  1. Break the logarithm of a quotient into a difference of logarithms first. Simplifying before differentiating saves an entire quotient-rule computation. Writing u=x2y2u=\sqrt{x^2-y^2},

    z=ln(xu)ln(x+u)z=\ln(x-u)-\ln(x+u)

    Also record the two partials of the inner radical once, since both derivatives need them:

    ux=xx2y2=xu,uy=yx2y2=yuu_x=\frac{x}{\sqrt{x^2-y^2}}=\frac{x}{u},\qquad u_y=\frac{-y}{\sqrt{x^2-y^2}}=-\frac{y}{u}

    One more relation will do most of the work later: x2u2=x2(x2y2)=y2x^2-u^2=x^2-(x^2-y^2)=y^2.

  2. Differentiate with respect to xx, treating yy as a constant. The chain rule on each logarithm gives

    zx=1uxxu1+uxx+u=1xuxu1+xux+u\frac{\partial z}{\partial x}=\frac{1-u_x}{x-u}-\frac{1+u_x}{x+u}=\frac{1-\dfrac{x}{u}}{x-u}-\frac{1+\dfrac{x}{u}}{x+u}

    Do not stop here and guess that the two symmetric-looking pieces cancel — they do not. Each one must be simplified first.

  3. Simplify each piece separately. Put the numerators over uu:

    1xuxu=uxuxu=(xu)u(xu)=1u\frac{1-\frac{x}{u}}{x-u}=\frac{\frac{u-x}{u}}{x-u}=\frac{-(x-u)}{u(x-u)}=-\frac{1}{u}

    1+xux+u=u+xux+u=x+uu(x+u)=1u\frac{1+\frac{x}{u}}{x+u}=\frac{\frac{u+x}{u}}{x+u}=\frac{x+u}{u(x+u)}=\frac{1}{u}

    So the first term is 1u-\tfrac1u and the second term is +1u+\tfrac1u, and the derivative is their difference:

    zx=1u1u=2u=2x2y2\frac{\partial z}{\partial x}=-\frac{1}{u}-\frac{1}{u}=-\frac{2}{u}=-\frac{2}{\sqrt{x^2-y^2}}

    This is the step where a sign slip is fatal: subtracting +1u+\tfrac1u from 1u-\tfrac1u gives 2u-\tfrac2u, not 00.

  4. Differentiate with respect to yy, treating xx as a constant. Now only uu depends on yy:

    zy=uyxuuyx+u=y/uxu+y/ux+u=yu(1xu+1x+u)\frac{\partial z}{\partial y}=\frac{-u_y}{x-u}-\frac{u_y}{x+u}=\frac{y/u}{x-u}+\frac{y/u}{x+u}=\frac{y}{u}\left(\frac{1}{x-u}+\frac{1}{x+u}\right)

    Both terms end up positive because each of them carries the same factor uy=+yu-u_y=+\dfrac{y}{u}: the minus signs coming from the quotient rule and from uy=y/uu_y=-y/u cancel each other.

  5. Combine the two fractions using x2u2=y2x^2-u^2=y^2.

    1xu+1x+u=(x+u)+(xu)x2u2=2xy2\frac{1}{x-u}+\frac{1}{x+u}=\frac{(x+u)+(x-u)}{x^2-u^2}=\frac{2x}{y^2}

    Therefore

    zy=yu2xy2=2xyu=2xyx2y2\frac{\partial z}{\partial y}=\frac{y}{u}\cdot\frac{2x}{y^2}=\frac{2x}{y\,u}=\frac{2x}{y\sqrt{x^2-y^2}}

  6. Check both answers numerically. Take x=3x=3, y=2y=2, so u=94=52.2360680u=\sqrt{9-4}=\sqrt5\approx2.2360680. A central difference with step 10610^{-6} gives

    zx0.8944272,zy1.3416408z_x\approx-0.8944272,\qquad z_y\approx1.3416408

    and the formulas give 2/5=0.8944272-2/\sqrt5=-0.8944272 and 2(3)/(25)=1.34164082(3)/(2\sqrt5)=1.3416408. Both match to seven decimals. (A frequently seen wrong answer, zx=0z_x=0, fails this test immediately: zz genuinely does change as xx moves with yy held fixed.)

Answer

zx=2x2y2,zy=2xyx2y2\frac{\partial z}{\partial x}=-\frac{2}{\sqrt{x^2-y^2}},\qquad \frac{\partial z}{\partial y}=\frac{2x}{y\sqrt{x^2-y^2}}

Need to solve a different problem like this? Open the solver →