This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

Implicit differentiation

From Mathematics Is A Science

Jump to: navigation, search

1 How we can differentiate equations

We will deal with equations here, but not like what we are used to: $$ \underbrace{x^{2}}_{\text{function}} = \underbrace{1}_{\text{Number}} \to \text{ find a particular number} x$$ These are equations, called "identities", of functions, like this: $$ u^{2} = \sin x \to \text{ find a particular function } u$$ The equation is true for all $x$.

Further we will rely on the following idea:

If two functions are equal (for all $x$) then so are their derivatives (for all $x$).

Example. Suppose we want to find the derivative of the logarithm. We'll use only its definition via the exponential function, as follows.

Differentiate this (true) equation of functions: $$\begin{aligned} e^{\ln x} & = x \\ (e^{\ln x})^{\prime} & (x)^{\prime} \end{aligned}$$

Flow chart of the function on the left: $$ x \to u = \ln x \to y =e^{u} $$ If we want to differentiate, $u^{\prime}$ on the left (we don't know what this is), and on the right: $\frac{dy}{du} = e^{u}.$

Chain rule : $$\begin{aligned} (e^{\ln x})^{\prime} & = (\ln x)^{\prime}\cdot e^{u} \\ & = (\ln x)^{\prime} e^{\ln x} \\ 1 & = (\ln x)^{\prime} x \end{aligned}$$

So $$\begin{aligned} (\ln x)^{\prime} x & = 1, \\ \Rightarrow (\ln x)^{\prime} & = \frac{1}{x} \end{aligned}$$ where $x > 0$.

Similarly, $\ln x$, $\sin^{-1} x$, $\cos^{-1} x$, etc, can't be differentiated explicitly.

Example.

Find $(\sin^{-1} y)^{\prime} =$? No formula for this function!

The meaning: $y = \sin x$ (can) or $x = \sin^{-1}y$ (can't).

Think of $x$ as a function of $y$
Differentiate: $y = \sin x$ with respect to $y$. $$\begin{aligned} \frac{d}{dy}(y) & = \frac{d}{dy} (\sin x) \\ 1 & = \cos x \frac{dx}{dy} \end{aligned}$$ So $$\begin{aligned} \frac{dx}{dy} &= \frac{1}{\cos x} \\ & = \frac{1}{\cos(\sin^{-1}y)} \end{aligned}$$ That may be the answer, but it's too cumbersome and should be simplified.

Instead express $\cos x$ in terms of $\sin x$ (which is $y$). Use $$\sin^{2} x + \cos^{2} x = 1 (\text{PT})$$ or $$\begin{aligned} \cos x & = \sqrt{1 - \sin^{2} x} \\ & = \sqrt{ 1 - y^{2}} \end{aligned} $$ substitute $$ \frac{dx}{dy} = \frac{1}{1 - y^{2}}. $$

Rewrite

$$\begin{aligned} (\sin^{-1}x)^{\prime} & = \frac{1}{\sqrt{1 - x^{2}}} \\ (\cos^{-1}x)^{\prime} & = -\frac{1}{1 - x^{2}} \\ (\tan^{-1}x)^{\prime} &= \frac{1}{1+x^{2}} \end{aligned}$$

2 Implicit curves

Another use for implicit differentiation is finding tangents to implicit curves.

Typically, a curve has been the graph of a function $y = x^{2}$, $y = \sin x$, etc, given explicitly. But, what's the equation of the circle? $$x^{2} + y^{2} = 1$$ Relation between $x$ and $y$ is implicit (as opposed to explicit: $y = \sqrt{1 - x^{2}}$ or $–\sqrt{1 - x^{2}}$.

Circle.png

Graph of $\to f^{\prime} \to $ tangent. This is not a graph because of the vertical line test. What do we do? To find it, I need the derivative, but there is no function to differentiate!

Instead, we differentiate the equation (relation between the functions/variables): $$ x^{2} + y^{2} = 1$$ $y$ is a function of $x$. $$\begin{aligned} \frac{d}{dx} (X^{2} + y^{2}) & = \frac{d}{dx} 1 \\ \frac{d}{dx} x^{2} + \frac{d}{dx}y^{2} &= 0 \\ \text{CR} 2x + 2y \frac{dy}{dx} &= 0 \\ \frac{dy}{dx} &= -\frac{x}{y}. \end{aligned}$$ That's also implicit.

Review exercise

Differentiate $y = \sqrt{\cos x}$. $$ \begin{alignat}{2} x \to u & = \cos x \to y & = u \\ \frac{dy}{dx} & = - \sin x & \frac{dy}{du} &= \frac{1}{2\sqrt{u}} \end{alignat}$$ CR: $$ \begin{aligned} \frac{dy}{dx} & = -\sin x \cdot \frac{1}{2\sqrt{u}} \\ &= \sin x \cdot \frac{1}{2\sqrt{\cos x}} \end{aligned}$$

Example, Circle. Find the tangent line for the circle with radius 1 at the point $(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2})$.

Tangent Lines

$$ x = \frac{\sqrt{2}}{2}, y = \frac{\sqrt{2}}{2} $$ Substitute into the formula above: $$\frac{dy}{dx} = - \frac{x}{y} = -\dfrac{\dfrac{\sqrt{2}}{2}}{\dfrac{\sqrt{2}}{2}} = -1 $$ Point- slope formula: $$ y - \frac{\sqrt{2}}{2} = -1\left( x - \frac{\sqrt{2}}{2}\right) $$

Note that we could use the explicit formula $y = \sqrt{1 - x^{2}}$ with the same result. However it's only explicit for the upper half:

Tangent Lines

$$\frac{dy}{dx} \overset{\text{CR}}{=} \frac{-2x}{2\sqrt{1 - x^{2}}} = -\frac{x}{1 - x^{2}}$$

Observe \frac{dy}{dx} undefined at $x= \pm 1$, implicit or explicit: $\frac{dy}{dx} = -\frac{x}{y}, (y = 0)$. What do we do? From the formula we can proceed in two ways: $$x^{2} + y^{2} = 1 \to \begin{cases} y \text{ depends on } x\\ x \text{ depends on } y \end{cases} $$ So, we can try implicit differentiation of $x^{2} + y^{2} = 1$ -- but with respect to $y$ this time: $$\frac{dx}{dy} = -\frac{y}{x}$$ Defined for $y = 0$, at $(-1,0), (1, 0)$. Then, $\frac{dx}{dy} = 0$ at these points. So, tangent line $x - 1 = 0 (y-0)$ or $x = 1$.

Tangent Lines

Example, Folium of Descartes

$$x^{3} + y^{3} = 6xy$$

Folium of Descartes

We differentiate the equation as before: $$ \frac{d}{dx} (x^{3} + y^{3}) = \frac{d}{dx} (6xy) $$ Rule: if you see $y$, add $\frac{dy}{dx}$ (Chain Rule) $$\begin{aligned} \frac{d}{dx} (x^{3}) + \frac{d}{dx} (y^{3}) & = 6\frac{d}{dx} (xy) \\ 3x^{2} + 3y^{2}\cdot \frac{dy}{dx} = 6 (y + x\frac{dy}{dx}) \leftrightarrow 0 = 0 \end{aligned}$$

Solve for $\frac{dy}{dx}$. $$\begin{aligned} 3x^{2} + 3y^{2} \frac{dy}{dx} & = 6y + 6x \frac{dy}{dx} \\ (3y^{2} - 6x) \frac{dy}{dx} & = 6y – 3x^{2} \\ \frac{dy}{dx} & = \underbrace{\frac{6y – 3x^{2}}{3y^{2} - 6x}}_{\text{Formula fails at } (0,0)} \end{aligned}$$ The end result is: if we know $(x, y)$, you know the slope of the tangent at that point.

3 Exponential functions

Recall how we found the derivative of the logarithm: $$\frac{d}{dx}(\ln x) = \frac{1}{x}$$ Similarly, by differenting: $a^{\log_{a} x} = x$ we obtain: $$\frac{d}{dx} (\log_{a} x) = \frac{1}{x\ln a}$$ Same trick for other functions, e.g. $x^{x}$.

Recall,

  • $(x^{2})^{\prime} = 2x$, by the power formula
  • $(2^{x})^{\prime} \neq x2^{x-1}$, an unfortunate misuse of the power formula!

Compare/contrast:

Recall: $$\underbrace{(2^{x})^{\prime} = 2^{x} \cdot \ln 2}_{\text{Exponent}}$$

Example: $x^{x}$, which formula do we apply?

Let's try the exponent formula, directly: $$(x^{x})^{\prime} \neq \underbrace{x^{x}\ln x}_{\text{Base isn't fixed!}}$$ Fail! But the exponent isn't fixed either, so the power formula does not apply either.

The trick is called "logarithmic differentiation". It uses: $$e^{\ln u} = u.$$ Substitute $u = x^{x}$, then $$f(x) = \underbrace{e^{\ln x^{x}}}_{\text{fixed base this time!}} = x^{x}$$

$$\begin{aligned} f(x) & = e^{\ln x} = e^{\ln x} \\ x \to v & = \underbrace{x \ln x}_{\frac{dv}{dx}} \overset{\text{PR}}{=} \ln x + x \frac{1}{x} \to \underbrace{y = e^{v}}_{\frac{dy}{dv}} = e^{v} \\ f^{\prime}(x) & = \frac{dv}{dx}\frac{dy}{dv} = (\ln x + x\frac{1}{x})e^{v} \\ & = \ln x + x\frac{1}{x})e^{x\ln x} \\ & = (\ln x + 1) x^{x} \end{aligned}$$

Example. Similar issues: $$x^{x^{2}} = e^{\ln x^{x^{2}}} = e^{x^{2\ln x}} \to \text{differentiate it!}$$

Review exercise. Given $$f(x) + x^2 \left[(f(x)\right]^{3} = 10$$ and $f(1) = 2$, find $f^{\prime}(1)$.

Same as above, just different notation. Observe that $y= f(x)$ then $$y + x^{2}y^{3} = 10,$$ familiar! Indeed $f^{\prime} = \frac{dy}{dx}$.

The plan still works. Differentiate the equation with respect to $x$. $$\begin{aligned} \left( f(x) + x^{2} \left[ f(x)\right]^{3} \right)^{\prime} &= (10)^{\prime} \\ \text{SR } f^{\prime}(x) + \left(x^{2}\left[f(x)\right]^{3}\right)^{\prime} &= 0 \\ \text{PR } f^{\prime}(x) + 2x \left[ f(x) \right]^{3} + x^{2}\left(\left[ f{x}\right]^{3}\right)^{\prime} &= 0 \\ \text{PR } f^{\prime}(x) + 2x\left[f(x)\right]^{3} + x^{2}3\left[f(x)\right]^{2}\cdot f^{\prime}(x) &= 0 \\ \end{aligned}$$ Solve for $f^{\prime}$: $$\begin{aligned} f^{\prime}(x) \left(1 + x^{2}3\left[f(x)\right]^{2}\right) &= -2x\left[f(x)\right]^{3} \\ f^{\prime}(x) & = \frac{-2x \left[ f(x) \right]^{3}}{1 + x^{2} 3 \left[ f(x)\right]^{2} } \end{aligned}$$ We know $f(1) = 2$, substitute: $$\begin{aligned} f^{\prime} & = -\frac{ 2x \left[ f(x)\right]^{3}}{ 1 + 2^{2}\cdot 3\left[ f(2) \right]^{2}} \\ &= \frac{-4\cdot 2^{3}}{1 + 12\cdot 2^{2}} \\ & = -\frac{32}{49}. \end{aligned}$$

Example.

Find $\frac{dy}{dx}:$ of $$ 2xy \sin y = y \cos x $$

$$\begin{aligned} \frac{d}{dx}(2xy) & = 2\frac{d}{dx}(xy) \\ & = 2 \left(\frac{d}{dx}(x) \cdot y + \frac{d}{dx}(y) \cdot x \right) \\ & = 2 \left( 1 \cdot y + \frac{dy}{dx} x \right) \\ \frac{d}{dx}(\sin y) &= \frac{d}{dx} \underbrace{(\sin(y(x)))}_{\text{Diff: } \sin \text{ and } y} = \cos y\cdot \frac{dy}{dx} \end{aligned} $$