Week 9 Discussion Notes

Table of Contents

Functions

A function ff always comes with a domain DD, and the range of ff is determined by DD. If the domain isn't specified, then it's usually taken to be the largest set where ff is defined.

Example 1.

If f(x)=1xf\p{x} = \frac{1}{x} and DD is not specified, then we assume D={xRx0}D = \set{x \in \R \mid x \neq 0}.

Example 2.

Let f(x)=x2f\p{x} = x^2.

  • D=R    R=[0,)D = \R \implies R = \left[ 0, \infty \right)

  • D=[0,)    R=[0,)D = \left[ 0, \infty \right) \implies R = \left[ 0, \infty \right)

  • D={xRx>2}    R=(4,)D = \set{x \in \R \mid x > 2} \implies R = \p{4, \infty}

Inverses

What is an Inverse?

Given a function ff, we'd like to know if we can go "backwards" from ff. This is useful if you need to solve something like f(x)=yf\p{x} = y; if we can "undo" ff, then we automatically have the solution to the equation. This can be done if ff is invertible:

Definition

Let ff have domain DD and range RR. If g\exists g with domain RR and range DD such that

  • f(g(x))=xf\p{g\p{x}} = x for all xRx \in R and
  • g(f(x))=xg\p{f\p{x}} = x for all xDx \in D,

then we say ff is invertible and we call f1=gf^{-1} = g the inverse of ff.

When is there an Inverse?

So when does ff have an inverse? Let's look at a situation where ff does not have one.

ff doesn't have an inverse here because we can't go backwards from yy to get both aa and bb. Indeed, any function gg with domain RR will map yy to either aa or bb, but not both. The problem is that ff maps two different elements to the same thing, so if we prevent this, ff will have an inverse.

To prevent this, we need ff to map two different elements to two different things. More succinctly, ab    f(a)f(b)a \neq b \implies f\p{a} \neq f\p{b}. If ff satisfies this, then we call ff one-to-one, but this isn't the only way to tell if ff is one-to-one:

Definition (one-to-one)

Let ff have domain DD, and suppose one of the following is true about ff:

  • ab    f(a)f(b)a \neq b \implies f\p{a} \neq f\p{b} for any a,bDa, b \in D or
  • f(x)=yf\p{x} = y has exactly one solution for every yRy \in R or
  • f(a)=f(b)    a=bf\p{a} = f\p{b} \implies a = b for any a,bDa, b \in D or
  • ff passes the horizontal line test.

Then we say ff is one-to-one or injective.

Notice that the domain is very important when determining whether ff is one-to-one or not.

Example 3.

Let f(x)=x2f\p{x} = x^2.

  • If D=RD = \R, then ff is not one-to-one.

    f(x)=1f\p{x} = 1 has two solutions: 1-1 and 11.

  • If D=[0,)D = \left[ 0, \infty \right), then ff is one-to-one.

    Since ff is one-to-one, it has an inverse, which is f1(x)=xf^{-1}\p{x} = \sqrt{x}.

Inverse Trigonometric Functions

Definitions

In order to define inverse trig functions, we need to find domains so that they are one-to-one without changing their ranges. Because trig functions oscillate, there are a lot of intervals like these, so which one do we take? 00 is a nice number, so we are going to look for a domain containing 00 which doesn't change the range of our function.

Take a look at the graph of sinx\sin{x}:

As you can see, [π2,π2]\br{-\frac{\pi}{2}, \frac{\pi}{2}} does the trick. On this interval, sinx\sin{x} passes the horizontal line test and it hits every point in its range, [1,1]\br{-1, 1}.

Now look at cosx\cos{x}:

There are two intervals in this case: [π,0]\br{-\pi, 0} and [0,π]\br{0, \pi}. Hopefully, you agree that [0,π]\br{0, \pi} is "nicer" than the other one since it contains only positive numbers, so we're going to restrict cosx\cos{x} to [0,π]\br{0, \pi} when defining the inverse.

The last one we're going to look at is tanx\tan{x}:

As in the case with cosx\cos{x}, we have multiple choices, but I think it's clear that (π2,π2)\p{-\frac{\pi}{2}, \frac{\pi}{2}} is the "nicest" interval we can use.

We can play the same game with the rest of the trig functions, and what we get are the following inverse functions:

Definition (inverse trigonometric functions)

We define the inverses of trig functions via the following tables:

f(x)f1(x)rangesinxarcsinx[π2,π2]cscxarccscx[π2,0)(0,π2]tanxarctanx(π2,π2)\def\arraystretch{1.5} \begin{array}{lll} f\p{x} & f^{-1}\p{x} & \text{range} \\ \hline \sin{x} & \arcsin{x} & \br{-\frac{\pi}{2}, \frac{\pi}{2}} \\ \csc{x} & \arccsc{x} & \left\lbrack -\frac{\pi}{2}, 0 \right\rparen \cup \left\lparen 0, \frac{\pi}{2} \right\rbrack \\ \tan{x} & \arctan{x} & \p{-\frac{\pi}{2}, \frac{\pi}{2}} \end{array}
f(x)f1(x)rangecosxarccosx[0,π]secxarcsecx[0,π2)(π2,π]cotxarccotx(0,π)\def\arraystretch{1.5} \begin{array}{lll} f\p{x} & f^{-1}\p{x} & \text{range} \\ \hline \cos{x} & \arccos{x} & \br{0, \pi} \\ \sec{x} & \arcsec{x} & \left\lbrack 0, \frac{\pi}{2} \right\rparen \cup \left\lparen \frac{\pi}{2}, \pi \right\rbrack \\ \cot{x} & \arccot{x} & \p{0, \pi} \end{array}

We get the range of f1(x)f^{-1}\p{x} by swapping the domain and range of f(x)f\p{x}.

Exercise 1.

Figure out the domains of the inverse trig functions.

One thing to notice is how I arranged the tables. If you look at the top table, the ranges are all [π2,π2]\br{-\frac{\pi}{2}, \frac{\pi}{2}} with some points removed, i.e., the range of arcsinx\arcsin{x} with some points removed. Similarly, the bottom table ranges are all the range of arccosx\arccos{x} with some points removed.

The way I remember how to group them are as follows: if sinx\sin{x} is the "main" function (e.g., cscx=1sinx\csc{x} = \frac{1}{\sin{x}}), then the range is related to arcsinx\arcsin{x}. Similarly, if cosx\cos{x} is the "main" function, then the range will be related to arccosx\arccos{x}.

Derivatives

Now that we have the inverses, let's talk about their derivatives:

Theorem
ddxarcsinx=11x2ddxarccosx=11x2ddxarctanx=11+x2ddxarcsecx=1xx21ddxarccscx=1xx21ddxarccotx=11+x2\begin{aligned} &\deriv{}{x} \arcsin{x} &=& \phantom{-}\frac{1}{\sqrt{1 - x^2}} \\ &\deriv{}{x} \arccos{x} &=& -\frac{1}{\sqrt{1 - x^2}} \\ &\deriv{}{x} \arctan{x} &=& \phantom{-}\frac{1}{1 + x^2} \\ &\deriv{}{x} \arcsec{x} &=& \phantom{-}\frac{1}{\abs{x}\sqrt{x^2 - 1}} \\ &\deriv{}{x} \arccsc{x} &=& -\frac{1}{\abs{x}\sqrt{x^2 - 1}} \\ &\deriv{}{x} \arccot{x} &=& -\frac{1}{1 + x^2} \\ \end{aligned}

These are all done by implicit differentiation, and I'll show one of them:

Example 4.

Prove that ddxarcsecx=1xx21\deriv{}{x} \arcsec{x} = \frac{1}{\abs{x}\sqrt{x^2 - 1}}.

Solution.

To start, I'm going to set y=arcsecxy = \arcsec{x}. Since arcsecx\arcsec{x} and secx\sec{x} are inverses, we can apply secθ\sec{\theta} to both sides to get secy=x\sec{y} = x. Now we can take derivatives on both sides to get

(secytany)y=1    y=1secytany.\p{\sec{y}\tan{y}} y' = 1 \implies y' = \frac{1}{\sec{y}\tan{y}}.

To finish the problem, we need to get the right-hand side in terms of xx. We already know that secy=x\sec{y} = x, so we need to handle tany\tan{y}. We can use the following trig identity to relate tany\tan{y} to secy=x\sec{y} = x:

tan2y+1=sec2y=x2    tan2y=x21    tany=±x21.\begin{aligned} \tan^2{y} + 1 = \sec^2{y} = x^2 &\implies \tan^2{y} = x^2 - 1 \\ &\implies \tan{y} = \pm\sqrt{x^2 - 1}. \end{aligned}

We need to figure out when the sign is positive and when the sign is negative, so we need to break it into two cases:

Case 1: secy=x>0\sec{y} = x > 0

Since y=arcsecxy = \arcsec{x}, yy is in the range of arcsecx\arcsec{x}, so yy is in the first or second quadrant.

Since secy>0\sec{y} > 0, this means that cosy>0\cos{y} > 0, which means that yy must be in Quadrant I. In this quadrant, tany>0\tan{y} > 0, so tany=x21\tan{y} = \sqrt{x^2 - 1} in this case.

Case 2: secy=x<0\sec{y} = x < 0

We can use the same argument: in this case, cosy<0\cos{y} < 0, so yy is in Quadrant II, which means that tany<0\tan{y} < 0. Thus, tany=x21\tan{y} = -\sqrt{x^2 - 1} in this case.

Now that we have established the signs of tany\tan{y}, we just need to plug it back into our original function. There are two cases, so we end up with a piecewise function:

y=1xtany={1xx21if x>01xx21if x<0=1xx21.\begin{aligned} y' &= \frac{1}{x\tan{y}} \\ &= \begin{cases} \dfrac{1}{\phantom{-}x\sqrt{x^2 - 1}} & \text{if } x > 0 \\[2ex] \dfrac{1}{-x\sqrt{x^2 - 1}} & \text{if } x < 0 \end{cases} \\ &= \frac{1}{\abs{x}\sqrt{x^2 - 1}}. \end{aligned}

The last equality comes from the fact that x=x\abs{x} = x if x>0x > 0 and x-x if x<0x < 0.

Integration by Parts

Theorem (integration by parts)

If uu and vv are functions, then

udv=uvvdu.\int u \,\diff{v} = uv - \int v \,\diff{u}.

Given an integral, you're free to choose uu and dv\diff{v} however you like. However, the main issue after applying the formula is the integral term vdu\int v \,\diff{u}, so before you start, try to think about what vduv \,\diff{u} looks like.

The way I remember the formula is that you pick one thing to differentiate (uu) and one thing to integrate (dv\diff{v}). Then you integrate first to get uvuv and then differentiate after to get vduv \,\diff{u}.

Examples

Example 5.

Calculate xsinxdx\displaystyle \int x\sin{x} \,\diff{x}.

Solution.

For this problem, you'll want to differentiate xx because it will just become 11. If you integrate xdxx \,\diff{x}, then you end up with 12x2\frac{1}{2} x^2, which is more complicated. So, we'll use u=xu = x and dv=sinxdx\diff{v} = \sin{x} \,\diff{x}, which gives us

du=dxandv=cosx.\diff{u} = \diff{x} \quad\text{and}\quad v = -\cos{x}.

Thus,

xsinxdx=xcosxcosxdx=xcosx+cosxdx=xcosx+sinx+C.\begin{aligned} \int x\sin{x} \,\diff{x} &= -x\cos{x} - \int -\cos{x} \,\diff{x} \\ &= -x\cos{x} + \int \cos{x} \,\diff{x} \\ &= \boxed{-x\cos{x} + \sin{x} + C}. \end{aligned}
Example 6.

Calculate cos1xdx\displaystyle \int \cos^{-1}{x} \,\diff{x}.

Solution.

Even though there's only one term, we can still use integration by parts because cos1x=cos1x1\cos^{-1}{x} = \cos^{-1}{x} \cdot 1. Choose dv=cos1xdx\diff{v} = \cos^{-1}{x} \,\diff{x} isn't going to do anything for us because we don't know how to integrate it (yet), so we need to let u=cos1xu = \cos^{-1}{x} and dv=dx\diff{v} = \diff{x} instead. Then

du=dx1x2andv=x.\diff{u} = -\frac{\diff{x}}{\sqrt{1 - x^2}} \quad\text{and}\quad v = x.

So if we integrate by parts, we get

cos1xdx=xcos1xx1x2dx=xcos1x+x1x2dx=xcos1x1x2+C.\begin{aligned} \int \cos^{-1}{x} \,\diff{x} &= x\cos^{-1}{x} - \int -\frac{x}{\sqrt{1 - x^2}} \,\diff{x} \\ &= x\cos^{-1}{x} + \int \frac{x}{\sqrt{1 - x^2}} \,\diff{x} \\ &= \boxed{x\cos^{-1}{x} - \sqrt{1 - x^2} + C}. \end{aligned}

(To calculate the integral, you can use u=1x2u = 1 - x^2.)

Example 7.

Calculate lnxdx\displaystyle \int \ln{x} \,\diff{x}.

Solution.

Like the example before, we can let u=lnxu = \ln{x} and dv=dx\diff{v} = \diff{x}. Then

du=dxxandv=x,\diff{u} = \frac{\diff{x}}{x} \quad\text{and}\quad v = x,

so we get

lnxdx=xlnxx1xdx=xlnxdx=xlnxx+C.\begin{aligned} \int \ln{x} \,\diff{x} &= x\ln{x} - \int x \cdot \frac{1}{x} \,\diff{x} \\ &= x\ln{x} - \int \,\diff{x} \\ &= \boxed{x\ln{x} - x + C}. \end{aligned}
Example 8.

Calculate lnxx3dx\displaystyle \int \frac{\ln{x}}{x^3} \,\diff{x}.

Solution.

I want to differentiate lnx\ln{x} because it gives me 1x\frac{1}{x}, which plays nicely with all the other terms. So, we want to choose u=lnxu = \ln{x} and dv=1x3dx\diff{v} = \frac{1}{x^3} \,\diff{x}, which gives

du=dxxandv=12x2.\diff{u} = \frac{\diff{x}}{x} \quad\text{and}\quad v = -\frac{1}{2x^2}.

Then the integral becomes

lnxx3dx=lnx2x2dx2x3=lnx2x2+dx2x3=lnx2x214x2+C=(2lnx14x2)+C.\begin{aligned} \int \frac{\ln{x}}{x^3} \,\diff{x} &= -\frac{\ln{x}}{2x^2} - \int -\frac{\diff{x}}{2x^3} \\ &= -\frac{\ln{x}}{2x^2} + \int \frac{\diff{x}}{2x^3} \\ &= -\frac{\ln{x}}{2x^2} - \frac{1}{4x^2} + C \\ &= \boxed{-\p{\frac{2\ln{x} - 1}{4x^2}} + C}. \end{aligned}