\chapter{Inverse Trig Functions}

Given a function $y=f(x)$, its {\bf inverse function} is the function
that ``goes backwards.'' We'll say what we mean by this a little later.
To find the \index{inverse function} inverse function, we (1) solve the equation $y=f(x)$ for $x$
in terms of $y$, obtaining $x=g(y)$, and then (2) interchange the
letters $x$ and $y$, i.e., write $y=g(x)$. Then we say that $g(x)$ is
the inverse function of $f(x)$. We will illustrate inverse functions by
a series of examples.


\begin{example}
\label{example:7.1}
$y=f(x)=2x+1$.

\smallskip

\begin{rightindent}{3.6 truein} 
We first solve for $x$ in terms of $y$: $x=0.5y-0.5$.  Then we interchange
$x$ and $y$: $y=g(x)=0.5x-0.5$.  At the right we show the graphs of both $f(x)$
and $g(x)$.  Notice that if we imagine a mirror along the line $y=x$, then
the two graphs are \index{mirror images} mirror images of one another.  That is always the
geometrical relationship between the graph of a function and the graph of
its inverse function.
\end{rightindent}
\hfill
%-figure GA -----------------------------
\begin{psfigure}{1.9in}{1.5in}{figGA.ps}
%\putcrosshair{0,0}
\puttext{0, 33.3}{\Small$f(x)$}
\puttext{33.3, 0}{\Small$g(x)$}
\end{psfigure}
%------------------------------

\end{example}

When we say that the inverse function $g(x)$ ``\index{goes backwards} goes backwards,'' we mean
that if you compute $f(x)$ and then apply $g(x)$ to that value, i.e., if
you compute $g(f(x))$, you will get $x$ back again.  The same thing happens
if you evaluate the two functions in the other order, applying $f$ to
$g(x)$, i.e., $f(g(x))$ is also equal to $x$:

\begin{quote}\em
If $f(x)$ and $g(x)$ are inverse functions of one another, then
$
g(f(x))=x \text{ and } f(g(x))=x.
$ 
\end{quote}
For instance, in Example~\ref{example:7.1}, we
check that $g(f(x))=0.5(2x+1)-0.5=x$ and $f(g(x))=2(0.5x-0.5)+1=x$.


\begin{example} 
\label{example:7.2}
$y=f(x)=x^3$.

\smallskip

\begin{rightindent}{3.6 truein} 
Solving for $x$, we obtain $x={\root 3 \of y}=y^{1/3}$, and so the inverse
function is $y=g(x)={\root 3 \of x}=x^{1/3}$.  Again the graph of $f(x)$
and the graph of $g(x)$ are mirror images of one another with respect to
the line $y=x$ (see right).  And again we find that applying $g$ to $f(x)$
or applying $f$ to $g(x)$ gets us back to $x$: $g(f(x))={\root 3 \of
{x^3}}=x$, $f(g(x))=\left({\root 3 \of x}\right)^3=x$.  We say that taking
the cube root is the inverse operation to cubing a number.
\end{rightindent}
\hfill
%-figure GB -----------------------------
\begin{psfigure}{1.9in}{1.5in}{figGB.ps}
%\putcrosshair{0,0}
\puttext{5, 27}{\Small$x^3$}
\puttext{27, 5}{\Small$\sqrt[3]{x}$}
%\puttext{0,-1}{}
\end{psfigure}
%------------------------------

\end{example}


\begin{example}
\label{example:7.3}
$y=f(x)=x^2$.

\smallskip

Here we have a situation that did not exist in the first two examples:
solving for $x$ gives two different functions, namely $x=\sqrt{y}$ and
$x=-\sqrt{y}$. We do not want this ambiguity, and so we make an
agreement to take only the nonnegative square root: $x=\sqrt{y}$. This
is equivalent to erasing the left half of the parabola $y=x^2$. Then the
inverse function is $y=\sqrt{x}$. After crossing out the left half of
the parabola, the resulting function $y=f(x)=x^2$ for $x\ge 0$ and the
inverse function $y=g(x)=\sqrt{x}$ have the same relation to one another
as in Examples~\ref{example:7.1} and \ref{example:7.2}. Namely, (1)
their graphs are mirror images of one another relative to the line
$y=x$; and (2) each function ``reverses'' the other one. That is, if we
take a nonnegative number, square it, and then take the nonnegative
square root, we get back to where we started; and if we take a
nonnegative number, take its square root, and then square it, we also
get back to where we started.

\end{example}

\smallskip

Example~\ref{example:7.3} illustrates two things to think about when dealing with the
inverse function of some $y=f(x)$: (1) the possibility that you might have
to select only part of $y=f(x)$ (such as the right half of the parabola in
Example~\ref{example:7.3}) in order to obtain a well-defined inverse function $y=g(x)$; (2)
the possibility that the domain does not consist of all $x$, i.e., only $x$
in a certain range can be substituted in $g(x)$.

\section{The Inverse Tangent Function} 

The \index{inverse tangent function} inverse tangent function, which is called the {\bf \index{arctangent} arctangent}, goes in
the reverse direction from the tangent function.  That is, the arctangent
of $x$ answers the question: What angle (in radians) has $x$ as its tan?
As in Example~\ref{example:7.3}, there's some ambiguity here.  In fact, in the case of the
arctangent, there are infinitely many possible angles whose tangent is $x$:
if $\theta$ has the property that $\tan\theta=x$, then so does
$\theta+\pi$, $\theta+2\pi$, $\theta+3\pi$, $\theta-\pi$, $\theta-2\pi$,
etc., because the tangent function has period $\pi$.  In other words, the
part of the graph of $y=\tan x$ contained between the two asymptotes at
$x=-\pi/2$ and $x=\pi/2$ is simply repeated between $x=\pi/2$ and
$x=3\pi/2$, between $x=3\pi/2$ and $x=5\pi/2$, and so on --- infinitely
often in both directions.  (Recall that while sine and cosine each has
period $2\pi$, the tangent function has period $\pi$.)  So in constructing
the inverse tangent function the first thing we have to do is cross out all
but one of the branches of the tangent function.  The usual convention is
to remove all but the branch near the $y$-axis, i.e., to look only at
angles between $-\pi/2$ and $\pi/2$.  After doing that, we obtain a
well-defined arctangent function, which will be denoted $y=\arctan\,x$.
That is, 
\[
\arctan\,x= \left(\text{\begin{minipage}{2.75in}
the angle in radians in the interval from $-\pi/2$ to $\pi/2$ whose 
tangent is $x$ \end{minipage} }\right)
\]

\smallskip

Before going farther, we make three remarks about notation.  
\begin{enumerate}
\item 
The function defined above is called the ``\index{principal value} principal value'' Arctangent
(with a capital ``A'').  In some situations we might want to consider {\it
any} angle whose tangent is $x$.  In that case we'll write arctan$\,x$ with
a small ``a.''
\item 
In many textbooks and on most calculators, the function $\arctan\,x$ is
denoted \index{bad notation, $\tan^{-1}x$} $\tan^{-1}x$.  We shall not use this notation, because it can be
confusing.  Namely, since $\tan^2x$ means $(\tan x)^2$, you might
erroneously think that $\tan^{-1}x$ is the same as $(\tan x)^{-1}$, which
is $\cot x$.  This is false.  The functions $\arctan x$ and $\cot x$ are
completely different: the first {\it goes backwards} from the tangent
function, whereas the second is the {\it reciprocal} of the tangent
function.
\item
We are using $\arctan\,x$ to mean the angle {\it in radians} whose tangent
is $x$.  The angle {\it in degrees} would be $(180/\pi)\arctan\,x$.  Be
careful when using calculators: most calculators will give you degrees
unless you specifically change the mode to radians. \index{degree/radian warning}
\end{enumerate}

\smallskip

\begin{rightindent}{2.5 truein}
Just as the function $y=\tan x$ has vertical asymptotes at $\pm\pi/2$, the
function $y=\arctan\,x$ has horizontal asymptotes at $\pm\pi/2$.  As $x$
goes from $-\infty$ to $+\infty$, its Arctan goes from $-\pi/2$ to $\pi/2$,
never taking values below $-\pi/2$ or above $\pi/2$.  As expected, the
graph of $y=\tan x$ (more precisely, the branch of the graph that we've
taken) and the graph of $y=\arctan\,x$ are \index{mirror images} mirror images of one another
with respect to the line $y=x$.
\end{rightindent}
\hfill
%-figure GC -----------------------------
\begin{psfigure}{3in}{2.5in}{figGC.ps}
%\putcrosshair{0,0}
\puttext{32, 12}{\Small $\arctan\, x$}
\puttext{15, 35}{\Small $\tan x$}
\puttext{-32, -12}{\Small $\arctan\, x$}
\puttext{-15, -35}{\Small $\tan x$}
\puttext{-5, 10}{\Tiny $\pi/2$}
%\puttext{-5, -10}{\Tiny $-\pi/2$}
 \puttext{10, -3}{\Tiny $\pi/2$}
%\puttext{-10, -3}{\Tiny $-\pi/2$}
\end{psfigure}
%------------------------------

\section[Derivative of Arctan]{The Derivative of $y=\mbox{Arctan}\,x$}

 To find $dy/dx$, where $y=\arctan\,x$, we replace the relation
$y=\arctan\,x$ with the equivalent relation expressing $x$ as a
function of $y$: $x=\tan y$.  In other words, the definition of Arctan
tells us that when $y=\arctan\,x$, then $y$ is an angle whose tan is $x$.
We then \index{implicitly differentiate} implicitly differentiate the relation $x=\tan y$, i.e., we take
$d/dx$ of both sides.  On the left we get 1.  On the right we must use the
chain rule, which says that the derivative of
$\tan(\text{some~function~of~x})$ is $\sec^2(\text{this~function})$ times
the derivative of this function.  Thus, we obtain: $$ 1=(\sec^2y)\frac{dy}{
dx},\qquad\text{and~so}\qquad\frac{dy}{dx}=\frac{1}{\sec^2y}.  $$ The only
trouble with this is that, as generally happens with implicit
differentiation, our formula for the derivative involves $y$.  We would
like to express $\frac{dy}{dx}=\frac{d}{dx}\arctan\,x$ in terms of $x$.  Now
using the trig identity $\sec^2y=1+\tan^2y$ (this trig identity comes from
the identity $1=\cos^2+\sin^2$ if you divide through by $\cos^2$), and also
the fact that $x=\tan y$, we can replace $\sec^2y$ in the denominator by
$1+x^2$.  Thus, $$\frac{dy}{dx}=\frac{d}{dx}\arctan\,x=\frac{1}{1+x^2}.
$$ This is a basic derivative formula.

\smallskip

If we have a function $u(x)$ inside the Arctan, then we combine this formula
with the chain rule, i.e., we have $$\frac{d}{dx}\,{\rm Arctan}(u)=
\frac{1}{1+u^2}\,\frac{du}{dx}.$$

Whenever we have a derivative formula, there's a companion antiderivative
formula: 
$$
\int\frac{dx}{1+x^2}=\arctan\,x+C.
$$ We shall later encounter some practical applications where this
integration formula comes in handy.

\smallskip

Whenever you have a new function, such as $\arctan\,x$, and a new derivative
formula, you can combine it with other functions and solve the same type of
problems as before --- derivatives of products and of functions of
functions, tangent line approximation, max/min, related rates, etc.

\begin{example}
\label{example:7.4}
Find the derivative of $(x+1)\,\arctan(\sqrt{x})$.

\smallskip

Using the product rule and the chain rule, we have 
\begin{align*}
\frac{d}{
dx}\left((x+1)\,\arctan(\sqrt{x})\right)
&= (x+1)\frac{1}{1+(\sqrt{x})^2}\cdot\frac{1}{2\sqrt{x}}
 +1\cdot\arctan(\sqrt{x})\\
&=\frac{1}{2\sqrt{x}}+\arctan(\sqrt{x}).
\end{align*}
\end{example}


\begin{example}
\label{example:7.5}
Using the \index{tangent line approximation} tangent line approximation and the fact that
$\tan 45^\circ=1$, find the angle in degrees whose tangent is $0.99$.

\smallskip

We apply the tangent line approximation formula 
$$
f(x+\Delta x)\approx
f(x)+\Delta x\,f'(x)
$$
to the situation: $f(x)=\frac{180}{\pi}\,\arctan\,x$,
$x=1$, $\Delta x=-0.01$.  We know that $f(1)=45$, and we want to know:
$f(1+(-0.01))=$?  Here $f'(x)=\frac{180}{\pi}\cdot\frac{1}{
1+x^2}=\frac{180}{\pi}\cdot\frac{1}{1+1}= 90/\pi$.  Thus, 
$$
f(x+\Delta x)\approx 45+(-0.01)(90/\pi)=44.71^\circ.
$$
\end{example}


\begin{example}
\label{example:7.6}\index{best view problem}
Suppose you are viewing a painting whose bottom is a
distance $a$ above eye level and whose top is a distance $b$ above eye
level.  You can see detail in the painting best when it occupies the
largest possible angle $\theta$ in your field of vision (see the diagram
at the right below).  How far should you stand back from the wall in order to get the
best view?

\smallskip

\begin{rightindent}{3.0 truein}
Using this diagram, we cannot express $\theta$ directly as an inverse trig
function, since it is not an angle in a right triangle.  However, $\theta$
is the {\it difference} between the lower-left angle of the larger right
triangle and the lower-left angle of the smaller right triangle.  In both
right triangles we have letters standing for the two legs.  
\hfill Thus, we can use the arctangent 
\end{rightindent}
\hfill
%-figure GD -----------------------------
\begin{psfigure}{1.5in}{1.25in}{figGD.ps}
%\putcrosshair{0,0}
\puttext{40., -6.7}{\Small$a$}
\puttext{40., 33.3}{\Small$b$}
\puttext{-10., -26.7}{\Small$\theta$}
\puttext{0, -46.7}{\Small$x$}
\puttext{-48, -36}{\Small eye level}
\end{psfigure}
%------------------------------

\noindent
function.  That is, $\theta$ is equal to the angle $\arctan(b/x)$ of the
larger right triangle minus the angle $\arctan(a/x)$ of the smaller right
triangle: $\theta=\arctan(b/x)-\arctan(a/x)$.  We want to maximize $\theta$
as a function of $x$.  Hence, we set $d\theta/dx$ equal to 0: $$
0=\frac{d\theta}{dx}=\frac{1}{1+(b/x)^2}\left(-\frac{b}{x^2}\right)-\frac{1}{
1+(a/x)^2}\left(-\frac{a}{x^2}\right), $$ where we have used the formula for
$d/dx$ of $\arctan\,u$.  We now simplify, multiplying the numerators and
denominators together in each term and bringing the first fraction (which
has a negative sign) over to the left:
\[
\frac{b}{b^2+x^2}=\frac{a}{a^2+x^2}.  
\]
To solve for $x$, we cross-multiply, then gather together the terms
containing an $x$, and finally factor out common factors on both sides:
\[
b(a^2+x^2)=a(b^2+x^2),\qquad bx^2-ax^2=ab^2-ba^2,\qquad(b-a)x^2=ab(b-a).  
\] 
Dividing by $b-a$ and taking the positive square root gives $x=\sqrt{ab}$.
From the practical setup it should be clear that	 this critical
point really is a maximum.  If you want to check by the \index{second derivative
method} second derivative
method, just take the second derivative of $\theta$ with respect to $x$ at
the point $x=\sqrt{ab}$.  You will get a negative value.

\end{example}

\section{The Inverse Sine Function} 

The \index{inverse sine function} inverse sine function answers the question: what angle (in radians) has
sine equal to $x$?  There are two things to watch out for here:
\begin{enumerate}
\item  As in the case of the tangent, there will
be infinitely many angles whose sine is the same.  So we must remove all of
the sine curve except for one section before we construct the inverse
function.  The usual convention, as in the case of Arctan, is to take the
part of the curve $y=\sin x$ between $x=-\pi/2$ and $x=\pi/2$, where $y$
goes exactly once through all values from $-1$ to $1$.  That is, we define
the principal value Arcsin of $x$ as follows:
\[
\arcsin\,x= \left(\text{\begin{minipage}{2in}
the angle in radians between $-\pi/2$
and $\pi/2$ whose sine is $x$.
\end{minipage}}  
\right)\] 

\item  Unlike Arctan, the function Arcsin cannot be
applied to all $x$, but rather only to $x$ between $-1$ and $1$.  This is
because, unlike the tangent function, which takes all values from $-\infty$
to $\infty$, the sine function only takes values between $-1$ and $1$, and
for $x$ outside of that interval there is no angle whose sine is $x$.
Thus, the {\it domain} of $\arcsin\,x$ is the interval $[-1,1]$.  
\end{enumerate}

\smallskip

\begin{rightindent}{2.5 truein} 
On the right is a
graph of the function $y=\sin x$ (between $x=-\pi/2$ and $x=\pi/2$) and the
function $y=\arcsin\,x$ (which has domain between $x=-1$ and $x=1$).  As
usual, the two graphs are symmetric with respect to the line $y=x$.

\vspace{0.25in}

\
\end{rightindent}
\hfill
%-figure GE -----------------------------
\begin{psfigure}{3in}{2in}{figGE.ps}
%\putcrosshair{0,0}
\puttext{20, 40}{\Small $\arcsin\,x$}
\puttext{40, 17}{\Small $\sin x$}
\puttext{-25, -42}{\Small $\arcsin\,x$}
\puttext{-35, -17}{\Small $\sin x$}
\puttext{-7,-40}{\Tiny $-\pi/2$}
\puttext{-5, 40}{\Tiny $\pi/2$}
\puttext{-25, -4}{\Tiny $-1$}
\puttext{25, -4}{\Tiny $1$}
\end{psfigure}
%------------------------------


 
\section[Derivative of Arcsin]{The Derivative of $y=\mbox{Arcsin}\,x$}


 The procedure is just like in the case of Arctan.  We first replace the
relation $y=$Arcsin$\,x$ by the relation $x=\sin y$, and then we take
$d/dx$ of both sides, obtaining $1=(\cos y)\frac{dy}{dx}$, i.e.,
$dy/dx=1/\cos y$.  We can express the derivative in terms of $x$, which
equals $\sin y$, by means of the trig identity $\cos=\sqrt{1-\sin^2}$.
Thus, $1/\cos y=1/\sqrt{1-\sin^2y}=1/\sqrt{1- x^2}$.  Hence we have
$$
\frac{d}{dx}\,\arcsin\,x={1}{\sqrt{1-x^2}}.
$$ 
(Note: When we take the square root in writing cos in terms of sin, in
general we have to put a $\pm$ in front of the radical; however, in this
case we know that we want the positive square root, because in our definition
of the Arcsin function $y$ has to be between $-\pi/2$ and $\pi/2$, and
for these values $\cos y$ is positive.)


The \index{companion antiderivative formula} companion antiderivative formula is 
$$
\int\frac{dx}{\sqrt{1-x^2}}=\arcsin\,x+C.
$$


\begin{example}
\label{example:7.7}
The tip of a 20-meter span of a drawbridge has been raised
8 meters above the horizontal, and it is being raised at 0.2 m/sec.  How
fast (in deg/sec) is the angle of the drawbridge increasing?

\smallskip

In this related rates problem, let $\theta$ be the angle in degrees, and
let $x$ be the height the tip has been raised.  Then
$\theta=\frac{180}{\pi}\,\arcsin(x/20)$, and so 
$$
\frac{d\theta}{dt}=\frac{d\theta}{dx}\cdot\frac{dx}{dt}=
\frac{180}{\pi}\,\frac{1}{\sqrt{1-(x/20)^2}}\,\frac{1}{20}\cdot\frac{dx}{dt}=
\frac{180}{\pi}\,\frac{0.05}{\sqrt{1-(8/20)^2}}\cdot
0.2=0.625\,\text{deg/sec}.
$$

\end{example}

\begin{example}
\label{example:7.8}
Evaluate: $\int dx/\sqrt{r^2-x^2}$, where $r$ is a
constant.

\smallskip

Here we'll make a $u$-substitution to transform the integral into a form
where we can use the above antiderivative formula, which we now restate
using the variable $u$: $\int du/\sqrt{1-u^2}=\arcsin\,u+C$.  The
difficulty in our example is that we have $r^2$ where we'd like to have 1.
We can get a 1 there by factoring out $r^2$ from $r^2-x^2$, i.e., by
writing $r^2-x^2=r^2\left(1-(x/r)^2\right)$, and then pulling the $r^2$ out
of the radical.  Thus, 
$$
\int\frac{dx}{\sqrt{r^2-x^2}}=\int\frac{1}{
r}\cdot\frac{dx}{\sqrt{1-(x/r)^2}}.
$$
 This suggests the $u$-substitution
$u=x/r$.  Then $du=(1/r)dx$, and so in our integral we can replace
$(1/r)dx$ by $du$ and the denominator by $\sqrt{1-u^2}$.  So we obtain:
$$
\int\frac{du}{\sqrt{1-u^2}}=\arcsin\,u+C=\arcsin(x/r)+C,
$$
which is our final answer.  As always in an antiderivative problem, we can
check that this is right by taking the derivative of our answer and seeing
that we do in fact get $1/\sqrt{r^2-x^2}$.

\end{example}


\section{The Inverse Cosine Function} 

So far we have dealt with the inverse functions of two of the six trig
functions (sine, cosine, tangent, secant, cosecant, cotangent). The
other four inverse trig functions are used less frequently, and in any
case they can be expressed in a simple way in terms of Arcsin or Arctan.
We illustrate this by discussing the function Arccosine.

\smallskip

A basic relationship between the cosine and the sine is that the cosine
of an angle is the sine of the complementary angle. This means that if
we want to know an angle whose cosine is $x$, we can take the
complementary angle of the angle whose sine is $x$, i.e., we can take
$(\pi/2)-\arcsin\,x$. We shall therefore define the principal value
arccosine, denoted $\arccos\,x$, as follows: 
$$ \arccos(x)=\frac{\pi}{
2}-\arcsin(x)\qquad\text{for}~~-1\le x\le 1. $$ 
Since Arcsin runs from
$-\pi/2$ to $\pi/2$, it follows that $\arccos(x)$ runs from $\pi$ to 0
as $x$ runs from $-1$ to 1. The derivative of $\arccos(x)$ is easy to
compute: 
$$ \frac{d}{dx}\,\arccos(x)=0-\frac{d}{dx}\,\text{Arcsin}(x)=
-\frac{1}{\sqrt{1-x^2}}. $$ %
