Category Archives: Calculus

Optimization Problems

In mathematics and also in applications, we often encounter problems that require to maximize or minimize the value of a certain quantity. The general procedure can be summarized as:

  1. Express the quantity to be maximized or minimized in terms of a single variable. The quantity may be described in terms of two variables however with given constraint it could be reduced to a single variable.
  2. Differentiate the function obtained in step 1 and set the derivative equal to 0.
  3. Solve the equation from step 2 to obtain critical values and determine whether they maximize or minimize the given quantity. Usually the first or second derivative test is a convenient tool for the required inspection.

Example. A farmer has 2400 ft of fencing and wants to fence off a rectangular field that borders a straight river. He needs no fence along the river. What are the dimensions of the field that has the largest area?

Solution. Let $x$ and $y$ denote the length and the width of the rectangular field. Suppose that the side along the river has the length $x$. Then the area is $A=xy$ and the required fencing in terms $x$ and $y$ is $x+2y=2400$. This fencing is a constraint and solve it for $y$ to obtain $y=1200-\frac{x}{2}$. Plugging this into $A$ for $y$, the area can be written as a function of a single variable $x$: $$A(x)=1200x-\frac{x^2}{2}$$ $A'(x)=1200-x$ and setting this equal to 0, we find $x=1200$. Since $A^{\prime\prime}(x)=-1<0$, by the second derivative test $x=1200$ gives rise to the absolute maximum of $A(x)$. The required dimensions are $1200\ \mbox{ft}\times 600\ \mbox{ft}$ where the side that borders the river is 1200 ft and the resulting largest area is 720,000 $\mbox{ft}^2$.

Example. A box with a square base and open top must have a volume of 32,000 $\mbox{cm}^3$. Find the dimensions of the box that minimize the amount of material used.

Solution. Let $x$ and $h$ be the length and the height of the box, respectively. Then $x^2h=32000$ and we want to minimize the surface area $A=x^2+4xh$. Solve the volume constraint for $h$ to obtain $h=\frac{32000}{x^2}$. Plugging this into $A$ for $h$, we write $A$ as a function of a single variable $x$: $$A(x)=x^2+\frac{128000}{x}$$ $A'(x)=2x-\frac{128000}{x^2}$ and setting it equalto 0, we find $x=40$. Since $A^{\prime\prime}(x)=2+\frac{256000}{x^3}>0$ for all $x>0$, $A(40)$ is the absolute minimum. Therefore the required dimensions are $40\ \mbox{cm}\times 40\ \mbox{cm}\times 20\ \mbox{cm}$.

Example. If 1200 $\mbox{cm}^2$ of material is available to make a box with a square base and an open top, find the largest possible volume of the box.

Solution. Let $x$ and $h$ be the length and the height of the box, respectively. Then $x^2+4xh=1200$ and we want to maximize $V=x^2h$. Solve the area for $h$ to obtain $h=\frac{1200-x^2}{4x}$. Plugging this into $V$, we write the volume as a function of a single variable $x$: $$V(x)=300x-\frac{1}{4}x^3$$ $V'(x)=300-\frac{3}{4}x^2$ and setting it equal to 0, we find $x=20$. Since $V'(x)$ is a quadratic polynomial with a negative leading coefficient, $V(2)=4000\ \mbox{cm}^3$ is the largest possible volume of the box.

Example. Find the point on the parabola $y^2=2x$ that is the closest to the point $(1,4)$.

Solution. Let $(x,y)$ denote a point on the parabola $y^2=2x$. The distance between $(x,y)$ and $(1,4)$ is $d=\sqrt{(x-1)^2+(y-4)^2}$ and we want to minimize this. Note minimizing $d$ is equivalent to minimizing $d^2=(x-1)^2+(y-4)^2$. Solve the equation of parabola for $x$ to obtain $x=\frac{y^2}{2}$. Plugging this into $d^2$, we can write it as a function of a single variable $y$: $$f(y)=\left(\frac{y^2}{2}-1\right)^2+(y-4)^2=\frac{y^4}{4}-8y+17$$ $f'(y)=y^3-8$ and setting it equal to 0, we find $y=2$. Since $f^{\prime\prime}(y)=3y^2>0$ for all $y\ne 0$, $(x,y)=(2,2)$ is the point on the parabola $y^2=2x$ that is the closest to (1,4)$.

The shortest distance from (1,4) to the parabola y^2=2x.

Remark. The above problem also can be solved using a simple geometric fact that the shortest path from $(1,4)$ to the parabola $y^2=2x$ would be normal to the tangent line (i.e. the path is perpendicular to the tangent line). Let $(a,b)$ be the point on the parabola that is closest to $(1,4)$. By implicit differentiation we find $\frac{dy}{dx}=\frac{1}{y}$ and so the normal line at $(a,b)$ has the slope $-b$. The equation of the normal line is then $y-4=-b(x-1)$. Since this line is passing through $(a,b)$, $b-a=-b(a-1)$ or $ab=4$. $(a,b)$ is also on the parabola so we have $b^2=2a$. Solve the two equations simultaneously to obtain $b=2$ and hence $a=2$. Therefore, $(a,b)=(2,2)$.

Improper Integrals

When we defined the definite integral $\int_a^b f(x)dx$, it was assumed that the limits $a$ and $b$ of the integral are finite and the integrand $f(x)$ is continuous on the closed interval $[a,b]$. Even if these assumptions are not satisfied, we can still consider a notion of integral extended from the definite integral (the Riemann integral). This extended integral is called the improper integral.

Infinite Limits

A definite integral, in which one or both limits of integration are infinite, is defined by the following: \begin{align*}\int_a^\infty f(x)dx&=\lim_{t\to\infty}\int_a^tf(x)dx\\\int_{-\infty}^b f(x)dx&=\lim_{t\to -\infty}\int_t^bf(x)dx\end{align*} The improper integrals are said to be convergent if the corresponding limit exists. Otherwise, divergent.

If both $\int_{-\infty}^a f(x)dx$ and $\int_a^\infty f(x)dx$ are convergent, we define $$\int_{-\infty}^\infty f(x)dx=\int_{-\infty}^a f(x)dx+\int_a^\infty f(x)dx$$


  1. $\int_{-\infty}^0e^xdx=\lim_{t\to -\infty}\int_t^0 e^xdx=\lim_{t\to -\infty}(1-e^t)=1$.
  2. $\int_2^\infty\frac{dx}{x}=\lim_{t\to \infty}\int_2^t\frac{dx}{x}=\lim_{t\to \infty}(\ln t-\ln 2)=\infty$.
  3. $\int_{-\infty}^0\frac{1}{1+x^2}dx=\lim_{t\to -\infty}\int_t^0\frac{1}{1+x^2}dx=\lim_{t\to -\infty}(-\tan^{-1}t)=\frac{\pi}{2}$.
  4. $\int_0^\infty\frac{1}{1+x^2}dx=\lim_{t\to\infty}\int_0^t\frac{1}{1+x^2}dx=\lim_{t\to\infty}(\tan^{-1}t)=\frac{\pi}{2}$.
  5. $\int_{-\infty}^\infty\frac{1}{1+x^2}dx=\int_{-\infty}^0\frac{1}{1+x^2}dx+\int_0^\infty\frac{1}{1+x^2}dx=\frac{\pi}{2}+\frac{\pi}{2}=\pi$.


  1. $\int_{-\infty}^\infty f(x)dx$ can be also defined by the double limit $$\int_{-\infty}^\infty f(x)dx=\lim_{b\to\infty\\a\to -\infty}\int_a^b f(x)dx$$
  2. $\int_{-\infty}^\infty\frac{2x}{1+x^2}dx$ is divergent as $\int_{-\infty}^0\frac{2x}{1+x^2}dx=-\infty$ and $\int_0^\infty\frac{2x}{1+x^2}dx=\infty$. On the other hand, $$\lim_{a\to\infty}\int_{-a}^a\frac{2x}{1+x^2}dx=0$$ This is called the Cauchy principal value of the integral $\int_0^\infty\frac{1}{1+x^2}dx$ and is denoted by $$\mathrm{p.v.}\int_0^\infty\frac{1}{1+x^2}dx$$ The Cauchy principal value is a method of assigning values to certain ill-defined improper integrals. We will not, however, be considering the Cauchy principal value here.

Discontinuous Integrand

If $f(x)$ is continuous for all values of $x$ in the domain $a\leq x\leq b$ except $x=b$ or $x=a$, $\int_a^b f(x)dx$ is defined by \begin{equation}\label{eq:impropint}\int_a^b f(x)dx=\lim_{t\to b-}\int_a^t f(x)dx\end{equation} or \begin{equation}\label{eq:impropint2}\int_a^b f(x)dx=\lim_{t\to a+}\int_t^b f(x)dx\end{equation} provided the corresponding limit exists.


  1. $\int_{-1}^0\frac{dx}{x^2}=\lim_{t\to 0-}\left(-\frac{1}{t}-1\right)=\infty$.
  2. $\int_0^a\frac{dx}{\sqrt{a^2-x^2}}=\lim_{t\to a-}\left(\sin^{-1}\frac{t}{a}\right)=\frac{\pi}{2}$.

When $f(x)$ is continuous for all values of $x$ in the domain $a\leq x\leq b$ except $x=c$ (where $a< c <b$), $\int_a^b f(x)dx$ is defined by $$\int_a^b f(x)dx=\int_a^c f(x)dx+\int_c^b f(x)dx$$ where the integrals in the RHS are evaluated in accordance with \eqref{eq:impropint} and \eqref{eq:impropint2}, respectively.

Example. Consider $\int_{-1}^1\frac{dx}{x^2}$.

The graph of y=1/x^2 on [-1,1]

Solution. Since the integrand is discontinous at $x=0$, we write the integral in two parts as $$\int_{-1}^1\frac{dx}{x^2}=\int_{-1}^0\frac{dx}{x^2}+\int_0^1\frac{dx}{x^2}=\infty+\infty=\infty$$

Remarks. If one mindlessly evaluates the integral as an ordinary definite integral, we obtain $$\int_{-1}^1\frac{dx}{x^2}=\left[-\frac{1}{x}\right]_{-1}^1=-2$$ However, this is nonsense because the integrand is always positive.

Integration of Rational Functions by Partial Fractions

Let us consider the integral $\int\frac{5x-3}{x^2-2x-3}dx$. $\frac{d}{dx}(x^2-2x-3)=2x-2$ so substitution is not an option. Noting $x^2-2x-3=(x+1)(x-3)$, let us assume instead that $$\frac{5x-3}{x^2-2x-3}=\frac{A}{x+1}+\frac{B}{x-3}$$ Then \begin{align*}5x-3&=A(x-3)+B(x+1)\\&=(A+B)x-3A+B\end{align*} Hence we obtain a system of linear equations $$\left\{\begin{aligned}A+B&=5\\-3A+B&=-3\end{aligned}\right.$$ Solving this system simultaneously we find $A=2$ and $B=3$.

Alternation: Let’s begin with $5x-3=A(x-3)+B(x+1)$. For $x=3$, we get $12=4B$ so $B=3$. For $x=-1$, we get $-8=-4A$ so $A=2$. This method certainly has a computational advantage when it works over getting a system of linear equations and solving it.

Now \begin{align*}\int\frac{5x-3}{x^2-2x-3}dx&=2\int\frac{dx}{x+1}+3\int\frac{dx}{x-3}\\&=2\ln|x+1|+3\ln|x-3|+C\end{align*}

General method of writing a rational function $\frac{f(x)}{g(x)}$ as a sum of partial fractions

  1. Let $x-r$ be a linear factor of $g(x)$. Suppose that $(x-r)^m$ is the highest power of $x-r$ that divides $g(x)$ i.e. $x=r$ is a zero of $g(x)$ with multiplicity $m$. Then to this factor, assign the sum of the $m$ partial fractions $$\frac{A_1}{x-r}+\frac{A_2}{(x-r)^2}+\cdots+\frac{A_m}{(x-r)^m}$$
  2. Let $x^2+px+q$ be a quadratic factor of $g(x)$ that cannot be factored further into linear factors with real coefficients. Suppose that $(x^2+px+q)^n$ is the highest power of this factor that divides $g(x)$. Then to this factor assign the sum of the $n$ partial fractions $$\frac{B_1x+C_1}{x^2+px+q}+\frac{B_2x+C_2}{(x^2+px+q)^2}+\cdots+\frac{B_nx+C_n}{(x^2+px+q)^n}$$

Example. Evaluate $\int\frac{x^2+4x+1}{(x-1)(x+1)(x+3)}dx$.

Solution. Let $$\frac{x^2+4x+1}{(x-1)(x+1)(x+3)}=\frac{A}{x-1}+\frac{B}{x+1}+\frac{C}{x+3}$$ Then $$A(x+1)(x+3)+B(x-1)(x+3)+C(x-1)(x+1)$$ For $x=1$, $8A=6$ so $A=\frac{3}{4}$. For $x=-1$, $-4B=-2$ so $B=\frac{1}{2}$. For $x=-3$, $8C=-2$ so $C=-\frac{1}{4}$. Hence, \begin{align*}\int\frac{x^2+4x+1}{(x-1)(x+1)(x+3)}dx&=\frac{3}{4}\int\frac{dx}{x-1}+\frac{1}{2}\int\frac{dx}{x+1}-\frac{1}{4}\int\frac{dx}{x+3}\\&=\frac{3}{4}\ln|x-1|+\frac{1}{2}\ln|x+1|-\frac{1}{4}\ln|x+3|+C\end{align*}

Example. Evaluate $\int\frac{6x+7}{(x+2)^2}dx$.

Solution. Let $\frac{6x+7}{(x+2)^2}=\frac{A}{x+2}+\frac{B}{(x+2)^2}$. Then $A=6$ and $B=-5$. Hence, \begin{align*}\int\frac{6x+7}{(x+2)^2}dx\\&=6\int\frac{dx}{x+2}-5\int\frac{dx}{(x+2)^2}\\&=6\ln|x+2|+\frac{5}{x+2}+C\end{align*}

Example. [Integrating an Improper Fraction] Evaluate $\int\frac{2x^3-4x^2-x-3}{x^2-2x-3}dx$.

Solution. By long division, divide $2x^3-4x^2-x-3$ by $x^2-2x-3$ to obtain quotient $2x$ and remainder $5x-3$. Thus $2x^3-4x^2-x-3=(x^2-2x-3)\cdot 2x+5x-3$ and $$\frac{2x^3-4x^2-x-3}{x^2-2x-3}=2x+\frac{5x-3}{x^2-2x-3}$$ $\frac{5x-3}{x^2-2x-3}$ is a proper fraction so we can apply the above method to write it as $$\frac{5x-3}{x^2-2x-3}=\frac{3}{x-3}+\frac{2}{x+1}$$ Hence, \begin{align*}\int\frac{2x^3-4x^2-x-3}{x^2-2x-3}dx&=\int 2xdx+3\int\frac{dx}{x-3}+2\int\frac{dx}{x+1}\\&=x^2+3\ln|x-3|+2\ln|x+1|+C\end{align*}

Remark. Instead of writing $\frac{5x-3}{x^2-2x-3}$ as $\frac{A}{x-3}+\frac{B}{x+1}$, let $$5x-3=A(x+1)+B(x-3)$$ $\frac{5x-3}{x+1}=A+\frac{B(x-3)}{x+1}$ and if $x=3$, $A=3$. $\frac{5x-3}{x-3}=\frac{A(x+1)}{x-3}+B$ and if $x=-1$, $B=2$. This is called Heaviside’s method and is easier to determine coefficients than the standard method we discussed above. However it can be useful only when the denominator has all linear factors.

Example. Evaluate $\int\frac{-2x+4}{(x^2+1)(x-1)^2}dx$.

Solution. Let $$\frac{-2x+4}{(x^2+1)(x-1)^2}=\frac{Ax+B}{x^2+1}+\frac{C}{x-1}+\frac{D}{(x-1)^2}$$ Then we obtain \begin{align*}-2x+4&=(Ax+b)(x-1)^2+C(x-1)(x^2+1)+D(x^2+1)\\&=(A+C)x^3+(-2A+B-C+D)x^2+(A-2B+C)x+(B-C+D)\end{align*} and hence the equations $A+C=0$, $-2A+B-C+D=0$, $A-2B+C=-2$, and $B-C+D=4$. Solve these equations simultaneously to obtain $A=2$, $B=1$, $C=-2$, and $D=1$. Therefore, \begin{align*}\int\frac{-2x+4}{(x^2+1)(x-1)^2}dx&=\int\frac{2x+1}{x^2+1}dx-2\int\frac{dx}{x-1}+\int\frac{dx}{(x-1)^2}\\&=\int\frac{2x}{x^2+1}dx+\int\frac{1}{x^2+1}dx-2\int{dx}{x-1}+\int\frac{dx}{(x-1)^2}\\&=\ln(x^2+1)+\tan^{-1}x-2\ln|x-1|-\frac{1}{x-1}+C\end{align*}

Example. Evaluate $\int\frac{dx}{x(x^2+1)^2}$.

Solution. Let $$\frac{1}{x(x^2+1)^2}=\frac{A}{x}+\frac{Bx+C}{x^2+1}+\frac{Dx+E}{(x^2+1)^2}$$ Then we have \begin{align*}1&=A(x^2+1)^2+(Bx+C)x(x^2+1)+(Dx+E)x\\&=(A+B)x^4+Cx^3+(2A+B+D)x^2+(C+E)x+A\end{align*} and comparing the coefficients we obtain the equations $A+B=0$, $C=0$, $2A+B+D=0$, $C+E=0$, and $A=1$. Solve these equations simultaneously to obtain $A=1$, $B=-1$, $C=0$, $D=-1$, and $E=0$. Therefore, \begin{align*}\int\frac{dx}{x(x^2+1)^2}&=\int\frac{dx}{x}-\int\frac{x}{x^2+1}dx-\int\frac{x}{(x^2+1)^2}dx\\&=\ln|x|-\frac{1}{2}\ln(x^2+1)+\frac{1}{2(x^2+1)}+C\end{align*}

Inverse Trigonometric Functions

$y=\sin x$ is not a one-to-one function so there cannot be an inverse function of $y=\sin x$. However we we restrict its domain to the closed interval $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ it becomes a one-to-one function as shown in Figure 1.

Figure 1. The graph of y=sin(x) on [-pi/2,pi/2]

This means that we can consider $y=\sin^{-1}x$, the inverse function of $y=\sin x$. That is to say, $y=\sin^{-1}x$ is the value in $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ for which $x=\sin y$. $y=\sin^{-1}x$ is also denoted by $y=\arcsin x$. Similarly,

  1. $y=\cos^{-1}x$ (or $y=\arccos x$) is the value in $[0,\pi]$ for which $x=\cos y$.
  2. $y=\tan^{-1}x$ (or $y=\arctan x$) is the value in $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$ for which $x=\tan y$.
  3. $y=\cot^{-1}x$ (or $y=arccot x$) is the value in $(0,\pi)$ for which $x=\cot y$.

Remark. In general, $y=\sin^{-1}x$ is an inverse relation of $y=\sin x$ which is multiple-valued. In order to consider differentiation, we require it to be single-valued and when $-\frac{\pi}{2}\leq\sin^{-1}x\leq\frac{\pi}{2}$ we call it the principal value of $\sin^{-1}x$ and denote it by $\mathrm{Sin}^{-1}x$. Throughout this note we will only consider principal values so we won’t be using the traditional notation like $y=\mathrm{Sin}^{-1}x$.

Recall that the graph of $y=f(x)$ and the graph of its inverse function $y=f^{-1}(x)$ are symmetric about the line $y=x$. Using this symmetry one can obtain the graph of an inverse trigonometric function. For example, Figure 2 shows the graph of $y=\sin x$ and the graph of $y=\sin^{-1} x$.

Figure 2. The graphs of y=sin(x) (in red), y=arcsin(x) (in blue) and y=x (in black).
Figure 3. The graph of y=arcsin(x)
Figure 4. The graph of y=arccos(x)
Figure 5. The graph of y=arctan(x) on [-20,20].
Figure 6. The graph of y=arccot(x) on [-20,20].

In addition, $y=\sec^{-1}x$ has domain $|x|\geq 1$ and range $\left[0,\frac{\pi}{2}\right)\cup\left(\frac{\pi}{2},\pi\right]$.

Figure 7. The graph of y=arcsec(x). The horizontal asymptote is y=pi/2.

$y=\csc^{-1}x$ has domain $|x|\geq 1$ and range $\left[-\frac{\pi}{2},0\right)\cup\left(0,\frac{\pi}{2}\right]$.

The graph of y=arccsc(x).

Inverse Functions and Their Derivatives

Let $y=f^{-1}(x)$ denote the inverse function of $f(x)$. Then \begin{equation}\label{eq:invfn}x=f(y)\end{equation} Differentiate \eqref{eq:invfn} with respect to $x$. \begin{equation}\label{eq:dinvfn}1=f'(y)\frac{dy}{dx}\end{equation} Solving \eqref{eq:dinvfn} for $\frac{dy}{dx}$ we have \begin{equation}\label{eq:dinvfn2}\frac{dy}{dx}=\frac{1}{f'(f^{-1}(x))}\end{equation}

Example. Let $f(x)=\ln x$. Knowing $f'(x)=\frac{1}{x}$ find the derivative of $f^{-1}(x)=e^x$.

Solution. Using \eqref{eq:dinvfn2} $$\frac{d}{dx}e^x=\frac{1}{\frac{1}{e^x}}=e^x$$

Although knowing the formula \eqref{eq:dinvfn2} is convenient, you can always find the derivative of an inverse function by following the same process of deriving \eqref{eq:dinvfn2}. It’s not actually anymore difficult or complicated than using \eqref{eq:dinvfn2}.

The Derivative of Inverse Trigonometric Functions

Let $f(x)=\sin x$. Then $f^{-1}(x)=\sin^{-1}x$. Using \eqref{eq:dinvfn2} \begin{align*}\frac{d}{dx}\sin^{-1}x&=\frac{1}{\cos(\sin^{-1}x)}\\&=\frac{1}{\sqrt{1-\sin^2(\sin^{-1}x)}}\\&=\frac{1}{\sqrt{1-x^2}}\end{align*} where $|x|<1$. The reason the sign in front of $\sqrt{}$ is positive is that $-\frac{\pi}{2}<\sin^{-1}x<\frac{\pi}{2}$ so $\cos(\sin^{-1}x)> 0$.

Alternative derivation: Let $y=\sin^{-1}x$. Then $x=\sin y$. By implicit differentiation $$1=\cos y\frac{dy}{dx}$$ Hence $$\frac{dy}{dx}=\frac{1}{\cos y}=\frac{1}{\cos(\sin^{-1}x)}=\frac{1}{\sqrt{1-x^2}}$$

If $u$ is a functions of $x$, then $$\frac{d}{dx}\sin^{-1}u=\frac{1}{\sqrt{1-u^2}}\frac{du}{dx},\ |u|<1$$ Similarly we obtain the rest of derivative formulas. \begin{align*}\frac{d}{dx}\cos^{-1}u&=-\frac{1}{\sqrt{1-u^2}}\frac{du}{dx},\ |u|<1\\\frac{d}{dx}\tan^{-1}x&=\frac{1}{1+u^2}\frac{du}{dx}\\\frac{d}{dx}\cot^{-1}x&=-\frac{1}{1+u^2}\frac{du}{dx}\\\frac{d}{dx}\sec^{-1}u&=\frac{1}{|u|\sqrt{u^2-1}}\frac{du}{dx},\ |u|>1\\\frac{d}{dx}\csc^{-1}x&=-\frac{1}{|u|\sqrt{u^2-1}}\frac{du}{dx},\ |u|>1\end{align*} In turns out we don’t really have to calculate all these formulas. We just need to calculate for example $\frac{d}{dx}\sin^{-1}$, $\frac{d}{dx}\tan^{-1}x$, $\frac{d}{dx}\sec^{-1}$ the rest can be obtained by inverse function-inverse cofunction identities \begin{align*}\cos^{-1}x&=\frac{\pi}{2}-\sin^{-1}x\\\cot^{-1}x&=\frac{\pi}{2}-\tan^{-1}x\\\csc^{-1}x&=\frac{\pi}{2}-\sec^{-1}x\end{align*}In case you haven’t seen this identities before they can be easily obtained from cofunction identities. For example sine and cosine are cofunctions of each other as you learned in trigonometry, namely $$\sin\left(\frac{\pi}{2}-x\right)=\cos x,\ \cos\left(\frac{\pi}{2}-x\right)=\sin x$$ Let $$\cos\left(\frac{\pi}{2}-y\right)=\sin y=x$$ Then $$\frac{\pi}{2}-y=\cos^{-1}x$$ i.e. the first identity above $$\cos^{-1}x=\frac{\pi}{2}-\sin^{-1}x$$

Integration Formulas

For any constant $a\ne 0$,

  1. $\int\frac{du}{\sqrt{a^2-u^2}}=\sin^{-1}\left(\frac{u}{a}\right)+C$, valid for $u^2<a^2$
  2. $\int\frac{du}{a^2+u^2}=\frac{1}{a}\tan^{-1}\left(\frac{u}{a}\right)+C$
  3. $\int\frac{du}{u\sqrt{u^2-a^2}}=\frac{1}{a}\sec^{-1}\left|\frac{u}{a}\right|+C$, valid for $|u|>a>0$

Example. \begin{align*}\int_{\sqrt{2}/2}^{\sqrt{3}/2}\frac{dx}{\sqrt{1-x^2}}&=\left.\sin^{-1}x\right|_{\sqrt{2}/2}^{\sqrt{3}/2}\\&=\sin^{-1}\left(\frac{\sqrt{3}}{2}\right)-\sin^{-1}\left(\frac{1}{\sqrt{2}}\right)\\&=\frac{\pi}{3}-\frac{\pi}{4}=\frac{\pi}{12}\end{align*}

Example. \begin{align*}\int\frac{dx}{\sqrt{3-4x^2}}&=\frac{1}{2}\int\frac{du}{\sqrt{3-u^2}} (u=2x)\\&=\frac{1}{2}\sin^{-1}\left(\frac{u}{\sqrt{3}}\right)+C\\&=\frac{1}{2}\sin^{-1}\left(\frac{2x}{\sqrt{3}}\right)+C\end{align*}

Example. \begin{align*}\int\frac{dx}{4x-x^2}&=\int\frac{dx}{4-(x-2)^2}\\&=\int\frac{du}{4-u^2} (u=x-2)\\&=\sin^{-1}\left(\frac{u}{2}\right)+C\\&=\sin^{-1}\left(\frac{x-2}{2}\right)+C\end{align*}

Example. \begin{align*}\int\frac{dx}{4x^2+4x+2}&=\int\frac{dx}{4\left(x+\frac{1}{2}\right)^2+1}\\&=\frac{1}{2}\int\frac{du}{u^2+1} (u=2x+1)\\&=\frac{1}{2}\tan^{-1}u+C\\&=\frac{1}{2}\tan^{-1}(2x+1)+C\end{align*}

Example. \begin{align*}\int\frac{dx}{e^{2x}-6}&=\int\frac{du}{u\sqrt{u^2-6}}\ (u=e^x)\\&=\frac{1}{\sqrt{6}}\sec^{-1}\left(\frac{e^x}{\sqrt{6}}\right)+C\end{align*} where $e^x>\sqrt{6}$ or equivalently $x>\ln\sqrt{6}\approx 0.8959$.

Integrating Inverses of Functions

Let $y=f^{-1}(x)$. Then $x=f(y)$ and $dx=f'(y)dy$. So with integration by parts, we have \begin{equation}\begin{aligned}\int f^{-1}(x)dx&=\int yf'(y)dy\\&=yf(y)-\int f(y)dy\\&=xf^{-1}(x)-\int f(y)dy\end{aligned}\label{eq:intinvfn}\end{equation} Using \eqref{eq:dinvfn2} we can also rewrite \eqref{eq:intinvfn} as \begin{equation}\label{eq:intinvfn2}\int f^{-1}(x)dx=xf^{-1}(x)-\int\frac{x}{f'(f^{-1}(x))}dx\end{equation}

Using \eqref{eq:intinvfn}\begin{align*}\int\cos^{-1}xdx&=x\cos^{-1}x-\sin y+C\\&=x\cos^{-1}x-\sin(\cos^{-1}x)+C\end{align*}Since $x=\cos y$, $$\sin(\cos^{-1}x)=\sin y=\sqrt{1-x^2}$$ (Recall that $0\leq\cos^{-1}x\leq\pi$ so $\sin^{-1}x\geq 0$.) Hence, \begin{equation}\label{eq:intinvcos}\int\cos^{-1}xdx=x\cos^{-1}x-\sqrt{1-x^2}+C\end{equation} Of course one can obtain \eqref{eq:intinvcos} using \eqref{eq:intinvfn2} though the required calculation is a bit longer. The integral \eqref{eq:intinvcos} can be also found without using \eqref{eq:intinvfn} or \eqref{eq:intinvfn2}. Using integration by parts\begin{align*}\int\cos^{-1}xdx&=x\cos^{-1}x+\int\frac{x}{\sqrt{1-x^2}}dx\\&=x\cos^{-1}x-\sqrt{1-x^2}+C\end{align*} The rest of the integrals of inverse trigonometric functions are given by\begin{align*}\int\sin^{-1}xdx&=x\sin^{-1}x+\sqrt{1-x^2}+C\\\int\tan^{-1}xdx&=x\tan^{-1}x-\frac{1}{2}\ln(1+x^2)+C\\\int\cot^{-1}xdx&=x\cot^{-1}x+\frac{1}{2}\ln(1+x^2)+C\\\int\sec^{-1}xdx&=x\sec^{-1}x-\frac{x}{|x|}\ln|x+\sqrt{x^2-1}|+C\\\int\csc^{-1}xdx&=x\csc^{-1}x+\frac{x}{|x|}\ln|x+\sqrt{x^2-1}|+C\end{align*}

Trigonometric Substitution

When the integrand contains $\sqrt{a^2+x^2}$, $\sqrt{a^2-x^2}$ or $\sqrt{x^2-a^2}$ and the integral cannot be evaluated by a simple substitution, the following trigonometric substitutions may come in handy:

  1. For $\sqrt{a^2+x^2}$, use $x=a\tan\theta$ with $-\frac{\pi}{2}<\theta<\frac{\pi}{2}$. Accordingly $dx=a\sec^2\theta d\theta$ and $a^2+x^2=a^2\sec^2\theta$.
  2. For $\sqrt{a^2-x^2}$, use $x=a\sin\theta$ with $-\frac{\pi}{2}\leq x\leq\frac{\pi}{2}$. Accordingly $dx=a\cos\theta d\theta$ and $a^2-x^2=a^2\cos^2\theta$. Note: You can also use the substitution $x=a\cos\theta$ with $0\leq\theta\leq\pi$. Accordingly $dx=-a\sin\theta d\theta$ and $a^2-x^2=a^2\sin^2\theta$.
  3. For $\sqrt{x^2-a^2}$, use $x=a\sec\theta$ with $0\leq\theta<\frac{\pi}{2}$ or $\pi\leq\theta<\frac{3\pi}{2}$. Accordingly $dx=a\sec\theta\tan\theta d\theta$ and $x^2-a^2=a^2\tan^2\theta$.

Example. Evaluate $\int\frac{dx}{\sqrt{4+x^2}}$.

Solution. Let $x=2\tan\theta$. Then $dx=2\sec^\theta d\theta$ and $4+x^2=4\sec^2\theta$. So \begin{align*}\int\frac{dx}{\sqrt{4+x^2}}&=\int\frac{2\sec^2\theta d\theta}{2|\sec\theta|}\\&=\int\sec\theta d\theta\ \left(\sec\theta>0\ \mbox{for}\ -\frac{\pi}{2}<\theta<\frac{\pi}{2}\right)\\&=\ln|\sec\theta+\tan\theta|+C’\end{align*} SInce $\tan\theta=\frac{x}{2}$ one may consider the triangle

Hence $$\int\frac{dx}{\sqrt{4+x^2}}=\ln|\sqrt{4+x^2}+x|+C$$ where $C=C’-\ln 2$.

Example. Evaluate $\int\frac{x^2}{\sqrt{9-x^2}}dx$.

Solution. Let $x=3\sin\theta$. Then $dx=3\cos\theta d\theta$ and $9-x^2=9\cos^2\theta$. \begin{align*}\int\frac{x^2}{\sqrt{9-x^2}}dx&=\int\frac{9\sin^2\theta(3\cos\theta d\theta)}{3|\cos\theta|}\\&=9\int\sin^2\theta d\theta\ \left(\cos\theta>0\ \mbox{for}\ -\frac{\pi}{2}<\theta<\frac{\pi}{2}\right)\\&=9\int\frac{1-\cos 2\theta}{2}d\theta\\&=\frac{9}{2}(\theta-\sin\theta\cos\theta)+C\\&=\frac{9}{2}\left(\sin^{-1}\frac{x}{3}-\frac{x}{3}\frac{\sqrt{9-x^2}}{3}\right)+C\\&=\frac{9}{2}\sin^{-1}\frac{x}{3}-\frac{x}{2}\sqrt{9-x^2}+C\end{align*}

Example. Evaluate $\int\frac{dx}{\sqrt{25x^2-4}}$.

Solution. $\int\frac{dx}{\sqrt{25x^2-4}}=\frac{1}{5}\int\frac{dx}{\sqrt{x^2-\left(\frac{2}{5}\right)^2}}$. Let $x=\frac{2}{5}\sec\theta$. Then $dx=\frac{2}{5}\sec\theta\tan\theta d\theta$ and $x^2-\left(\frac{2}{5}\right)^2=\frac{4}{25}\tan^2\theta$. \begin{align*}\int\frac{dx}{\sqrt{25x^2-4}}&=\frac{1}{5}\int\frac{dx}{\sqrt{x^2-\left(\frac{2}{5}\right)^2}}\\&=\frac{1}{5}\int\frac{\frac{2}{5}\sec\theta\tan\theta d\theta}{5\left(\frac{2}{5}\right)\tan\theta}\ \left(\tan\theta>0\ \mbox{for}\ 0<\theta<\frac{\pi}{2}\right)\\&=\frac{1}{5}\int\sec\theta d\theta\\&=\frac{1}{5}\ln|\sec\theta +\tan\theta|+C’\\&=\frac{1}{5}\ln|5x+\sqrt{25x^2-4}|+C\end{align*} where $C=C’-\frac{\ln 2}{5}$.

Example. Find the area enclosed by the ellipse $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$

Solution. The ellipse in the first quadrant is given by the function $y=\frac{b}{a}\sqrt{a^2-x^2}$, $0\leq x\leq a$. So the area is \begin{align*}A&=4\int_0^a\frac{b}{a}\sqrt{a^2-x^2}dx\\&=4\frac{b}{a}\int_0^{\frac{\pi}{2}}a\cos\theta(a\cos\theta d\theta)\ (x=a\sin\theta$)\\&=4ab\int_0^{\frac{\pi}{2}}\cos^2\theta d\theta\\&=4ab\int_0^{\frac{\pi}{2}}\frac{1+\cos 2\theta}{2}d\theta\\&=\pi ab\end{align*}