derivatives_of_inverse

2600 days ago by chrisphan

x = var('x') def tang_and_inv_tan1(a, showtanglines=true): graph1 = plot(exp(x), x, -4, 2, rgbcolor=(0, 0, 0.5), ymin=-4, ymax=7, aspect_ratio=1) graph2 = plot(log(x), x, 0.01, 7, rgbcolor=(0, 0.5, 0), ymin=-4, ymax=7, aspect_ratio=1) mirrorline = plot(x, x, -4, 7, rgbcolor=(0.5, 0, 0.5), linestyle=":", ymin=-4, ymax=7, aspect_ratio=1) reflectline = line([[a, exp(a)], [exp(a), a]], linestyle=":", ymin=-4, ymax=7, aspect_ratio=1) lab1 = text("(" + str(round(a, 3)) + ", " + str(round(exp(a), 3)) + ")", [a + 1.5, exp(a)], rgbcolor=(0,0,0)) lab2 = text("(" + str(round(exp(a), 3)) + ", " + str(round(a, 3)) + ")", [exp(a) + 1.5, a], rgbcolor=(0,0,0)) tanline1 = plot(exp(a)*(x-a) + exp(a), x, -4, 7, rgbcolor=(0.5, 0, 0), ymin=-4, ymax=7, aspect_ratio=1) tanline2 = plot((1/exp(a))*(x - exp(a)) + a, -4, 7, rgbcolor=(0.5, 0, 0), ymin=-4, ymax=7, aspect_ratio=1) pts = point([a, exp(a)], rgbcolor=(1, 0, 0)) + point([exp(a), a], rgbcolor=(1, 0, 0), ymin=-4, ymax=7, aspect_ratio=1) outimg = graph1 + graph2 + pts + mirrorline + reflectline + lab1 + lab2 if showtanglines: outimg = outimg + tanline1 + tanline2 return(outimg) html("Suppose $f$ is a one-to-one function. For every point $P_1 = (a, b)$<br />on the graph of $y = f(x)$, there is a corresponding point $P_2 = (b, a)$ on the<br />graph of $y = f^{-1}(x)$. The points $P_1$ and $P_2$ are reflections of each other<br />over the line $y=x$. In the illustration below, $a = 1.2$ and $b = 3.32$.") show(tang_and_inv_tan1(1.2, false)) html("Now, suppose we have a line tangent to $y = f(x)$ at the point $(a,b)$. The<br />slope $m$ of this line will be $m = f'(a)$. Since the graph of $y = f^{-1}(x)$ is<br />the reflection of the graph of $y = f(x)$, the line tangent to $y = f^{-1}(x)$<br />at $(b,a)$ will have a slope of $1/m$, the reciprocal of $m$.") show(tang_and_inv_tan1(1.2, true)) anim = animate([tang_and_inv_tan1(0.1*t, true) for t in range(-28, 18)], ymin=-4, ymax=7, aspect_ratio=1) html("Here is an animation showing the two tangent lines at various values of $a$:") show(anim) 
       
Suppose f is a one-to-one function. For every point P_1 = (a, b)
on the graph of y = f(x), there is a corresponding point P_2 = (b, a) on the
graph of y = f^{-1}(x). The points P_1 and P_2 are reflections of each other
over the line y=x. In the illustration below, a = 1.2 and b = 3.32.
Now, suppose we have a line tangent to y = f(x) at the point (a,b). The
slope m of this line will be m = f'(a). Since the graph of y = f^{-1}(x) is
the reflection of the graph of y = f(x), the line tangent to y = f^{-1}(x)
at (b,a) will have a slope of 1/m, the reciprocal of m.
Here is an animation showing the two tangent lines at various values of a:
                                
                            
Suppose f is a one-to-one function. For every point P_1 = (a, b)
on the graph of y = f(x), there is a corresponding point P_2 = (b, a) on the
graph of y = f^{-1}(x). The points P_1 and P_2 are reflections of each other
over the line y=x. In the illustration below, a = 1.2 and b = 3.32.
Now, suppose we have a line tangent to y = f(x) at the point (a,b). The
slope m of this line will be m = f'(a). Since the graph of y = f^{-1}(x) is
the reflection of the graph of y = f(x), the line tangent to y = f^{-1}(x)
at (b,a) will have a slope of 1/m, the reciprocal of m.
Here is an animation showing the two tangent lines at various values of a:
                                
def tang_and_inv_tan2(a, showtanglines=true, showpts=true): graph1 = plot(sin(x), x, (-1/2)*pi, (1/2)*pi, rgbcolor=(0, 0, 0.5)) graph1_dotted1 = plot(sin(x), x, (-5/8)*pi, (-1/2)*pi, rgbcolor=(0, 0, 0.5), linestyle=":") graph1_dotted2 = plot(sin(x), x, (1/2)*pi, (5/8)*pi, rgbcolor=(0, 0, 0.5), linestyle=":") graph2 = plot(asin(x), x, -1, 1, rgbcolor=(0, 0.5, 0)) mirrorline = plot(x, x, (-2/3)*pi, (2/3)*pi, rgbcolor=(0.5, 0, 0.5), linestyle=":") reflectline = line([[a, sin(a)], [sin(a), a]], linestyle=":") lab1 = text("(" + str(round(a, 3)) + ", " + str(round(sin(a), 3)) + ")", [a + 0.4, sin(a)- 0.125], rgbcolor=(0,0,0)) lab2 = text("(" + str(round(sin(a), 3)) + ", " + str(round(a, 3)) + ")", [sin(a) - 0.5, a], rgbcolor=(0,0,0)) tanline1 = plot(cos(a)*(x-a) + sin(a), x, (-2/3)*pi, (2/3)*pi, rgbcolor=(0.5, 0, 0)) tanline2 = plot((1/cos(a))*(x - sin(a)) + a, (-2/3)*pi, (2/3)*pi, rgbcolor=(0.5, 0, 0)) pts = point([a, sin(a)], rgbcolor=(1, 0, 0)) + point([sin(a), a], rgbcolor=(1, 0, 0)) outimg = graph1 + graph1_dotted1 + graph1_dotted2 + graph2 + mirrorline if showpts: outimg = outimg + pts + reflectline + lab1 + lab2 if showtanglines: outimg = outimg + tanline1 + tanline2 return(outimg) html("Here is the graph of $y = \sin x$, with domain restricted to $[-\pi/2, \pi/2]$,<br />and the inverse function $y = \\arcsin x$.") show(tang_and_inv_tan2(pi/3, false, false), xmin=(-5/8)*pi, xmax=5/8*pi, ymin=(-1/2)*pi, ymax=(1/2)*pi, aspect_ratio=1) html("Here in an animation showing the lines tangent to $y = \sin x$ at $(a, \sin a)$<br /> and $y = \\arcsin x$ at $(\sin a, a)$, for various values of $a$:") anim2 = animate([tang_and_inv_tan2(0.1*t, true, true) for t in range(-15, 15)], xmin=(-5/8)*pi, xmax=(5/8)*pi, ymin=-1.5, ymax=1.5, aspect_ratio=1) show(anim2) 
       
Here is the graph of y = \sin x, with domain restricted to [-\pi/2, \pi/2],
and the inverse function y = \arcsin x.
Here in an animation showing the lines tangent to y = \sin x at (a, \sin a)
and y = \arcsin x at (\sin a, a), for various values of a:
Here is the graph of y = \sin x, with domain restricted to [-\pi/2, \pi/2],
and the inverse function y = \arcsin x.
Here in an animation showing the lines tangent to y = \sin x at (a, \sin a)
and y = \arcsin x at (\sin a, a), for various values of a:
html("Here is a plot of $f(x) = \\arcsin x$, an animated tangent line,<br />and the derivative $f'(x) = \\frac{1}{\sqrt{1 - x^2}}$.<br />(The derivative may appear first.)") anim3 = animate([plot((1/sqrt(1-a^2))*(x - a) + asin(a), x, -1, 1, rgbcolor=(0.5, 0, 0)) + plot(asin(x), x, -1, 1, rgbcolor=(0, 0.5, 0)) + point([a, asin(a)], rgbcolor=(1, 0, 0)) for a in srange(-0.95, 1, 0.05)], ymin=-1*pi/2, ymax = pi/2, aspect_ratio=1, figsize=[4,4]) show(anim3) plot(1/sqrt(1 - x^2), x, -0.99, 0.99, figsize=[2.6,2.6]) 
       
Here is a plot of f(x) = \arcsin x, an animated tangent line,
and the derivative f'(x) = \frac{1}{\sqrt{1 - x^2}}.
(The derivative may appear first.)

                                
                            
Here is a plot of f(x) = \arcsin x, an animated tangent line,
and the derivative f'(x) = \frac{1}{\sqrt{1 - x^2}}.
(The derivative may appear first.)