# Why is arcsin a function and not a relation since $\arcsin(\sin(\frac{3\pi}{4})) = \frac{\pi}{4}$?

Since $\sin(\frac{\pi}{4})$ and $\sin(\frac{3\pi}{4})$ are both $\frac{\sqrt{2}}{2}$, shouldn't $\arcsin(\frac{\sqrt{2}}{2})$ map to both $\frac{\pi}{4}$ and $\frac{3\pi}{4}$ and therefore not be a function?

when I input $\arcsin(\frac{\sqrt{2}}{2})$ into Wolfram, I get back $\frac{\pi}{4}$ only, but isn't the point of an inverse function that $f^{-1}(f(x)) = x$?

In this case however, $\arcsin(\sin(\frac{3\pi}{4})) = \frac{\pi}{4}$

What am I missing?

• I think this is just a convenient definition. No one says $\arcsin x$ is the inverse function of $\sin x$. Please point out if I made mistake. – MonkeyKing May 1 '15 at 1:41
• I'm pretty sure I've always seen arcsin defined as the inverse function of the sin function. – jeremy radcliff May 1 '15 at 1:42
• OK, I mean not the inverse function of $\sin x$ over $\Bbb R$. I should practice language skill more. :( – MonkeyKing May 1 '15 at 1:46
• No problem, what you said is clear now in the context of user17762's answer, I just didn't have the knowledge to understand your reply when I first read it :) – jeremy radcliff May 1 '15 at 1:49

The important thing to realise here is that a function is not just a rule. To specify a function properly you must also define the domain and codomain. For example, the sine function is $$\sin:{\Bbb R}\to{\Bbb R}\quad\hbox{where}\quad \sin x= \langle\hbox{insert your favourite definition}\rangle\ .$$ This function is not one-to-one (injective) and therefore has no inverse.

Here is a different function: $$f:\Bigl[-\frac\pi2,\frac\pi2\Bigr]\to[-1,1]\quad\hbox{where}\quad f(x)=\sin x=\langle\hbox{same definition as above}\rangle\ .$$ This function is one-to-one and onto and therefore has an inverse. Its inverse is commonly denoted $\sin^{-1}$ or $\arcsin$. Notice however that this terminology is not strictly accurate: $\arcsin$ is not the inverse of $\sin$, it is the inverse of $f$, which is a different function.

Hope this clears things up.

• Thanks David, it does clear things up. In the line $\sin:{\Bbb R}\to{\Bbb R}$, you don't limit the range to [-1, 1], but even with all the real numbers as potential inputs, in the original sin function the outputs can never be out of the range [-1, 1]. Do you not have to specify the codomain because it's implicitly limited? And in that case, do you have to specify the codomain for $f$? (not trying to nitpick, I just want to make sure I grasp the exact notational logic) – jeremy radcliff May 1 '15 at 2:02
• There is another common imprecision involved here. (Mathematicians speaking imprecisely... shock, horror ;-) Strictly speaking a function $f:A\to B$ is invertible if and only if it is one-to-one and onto. For example,$$f:{\Bbb R}\to{\Bbb R}\ ,\quad f(x)=e^x$$is not onto and therefore not invertible. But in calculus, one commonly treats $f$ as the same function as$$g:{\Bbb R}\to{\Bbb R}^+\ ,\quad g(x)=e^x$$(which it really isn't), and $g$ is invertible. (continued...) – David May 1 '15 at 2:08
• If my $f$ above had codomain $\Bbb R$ it would be invertible under this (mis)interpretation. However $\sin$ with domain $\Bbb R$ is not one-to-one and therefore is not invertible, no matter what you choose for the codomain. – David May 1 '15 at 2:08
• This is great, it all makes sense now. Thanks for taking the time to clarify, I really appreciate. – jeremy radcliff May 1 '15 at 2:17
• You're welcome, glad I could help. – David May 1 '15 at 2:20

Recall that $\arcsin: [-1,1] \mapsto [-\pi/2,\pi2/]$, i.e., the range of $\arcsin$ is $[-\pi/2,\pi/2]$.

The function $\sin$ on the other hand is a non-injective function that maps the real line to $[-1,1]$. Defining an inverse for a non-injective functions is not possible. Hence, one route that is often taken is to restrict the domain of the original function such that the function on the new restricted domain is injective.

Hence, the function $\arcsin$ is the inverse of $\sin$ only when the domain of the function $\sin$ is restricted to $[-\pi/2,\pi/2]$.

EDIT

What mathematica does is the following. It first evaluate $\sin(3\pi/4)$, which is $1/\sqrt{2}$. Now it goes and asks the function $\arcsin$, what $\arcsin(1/\sqrt2)$ is, which is now $\pi/4$.

• That makes sense, but in this case isn't $\frac{3\pi}{4}$ an invalid input and shouldn't Wolfram Alpha give me an error along the lines of "invalid domain" or something? Are they just allowing it because it's convenient? – jeremy radcliff May 1 '15 at 1:45
• @jeremyradcliff No. What mathematica does is the following. It first evaluate $\sin(3\pi/4)$, which is $1/\sqrt{2}$. Now it goes and asks the function $\arcsin$, what $\arcsin(1/\sqrt2)$ is, which is now $\pi/4$. – Leg May 1 '15 at 1:46
• Ah ok, now all of it makes sense; thank you, it was starting to drive me insane. – jeremy radcliff May 1 '15 at 1:48

As others have pointed out, $\arcsin x$ has the restricted domain $[-1,1]$ and range $[\frac{-\pi}{2},\frac{\pi}{2}]$. This restriction is a choice, a definition.

What's really happening is that $\arcsin x$ is multi-valued. We're only selecting what is called the principal branch, and we're doing this for convenience.

Since the trigonometric functions are periodic, a single-valued function that acts as an inverse doesn't exist. We elect to "chop up" the inversion relation into sections - the branches. In the case of $\arcsin x$ we focus on returning $\sin x$ input values $[\frac{-\pi}{2},\frac{\pi}{2}]$. This branch is the principal branch - the one we've elected to use most often. Why? Well, consider that $\sin x$ cycles through all possible outputs when we give it $[\frac{-\pi}{2},\frac{\pi}{2}]$. Also, it's "nicely packaged" - there's a distinct symmetry and accessibility in using $[\frac{-\pi}{2},\frac{\pi}{2}]$.

When evaluating a query such as yours, we compensate by finding an equivalent result in the principal branch.

• Thanks zahbaz, that's very helpful because it makes it clear that it's a choice of convenience and why, which is something I've been struggling with (the idea that a lot of math is based on convenience and not some absolute ideal) – jeremy radcliff May 1 '15 at 2:11


Refractive Index of Water/Glass Combination

1. Jan 14, 2010

labview1958

If a beam of light enters water from air at 30 degrees from the normal. It then enters a glass block and exit into air. At what angle does it exit from glass to air ? My friend says it exist again at 30 degrees to normal. The refractive index of water is 1.3 and glass is 1.5.

2. Jan 14, 2010

RoyalCat

Your friend's forgotten Snell's Law: $$n_1 \sin{\theta _1}=n_2 \sin{\theta _2}$$
Where the index 1 refers to the material the light's coming from, and the index 2 refers to the material the light's entering.

3. Jan 14, 2010

MATLABdude

To elaborate upon what RoyalCat says, assume you have just a block of glass (width does not matter--the pendant in me says as long as it's sufficiently thin so that not all the light is absorbed). Now assume that you have a beam of light striking at angle $\theta_i$. What angle (in terms of $\theta_i$) will the beam of light travel at within the glass? At what angle (again, in terms of $\theta_i$) will the beam of light exit at?

This interesting result is probably what led your friend to come up with their answer. Unfortunately, in your example, the symmetry (because there is no glass on the way in) is broken.

Last edited: Jan 14, 2010
4. Jan 14, 2010

labview1958

For air/water/glass/water/air combination, then incoming and outgoing angle is same? This is not same for air/water/glass/air ?

5. Jan 14, 2010

mgb_phys

Correct

It's the same for each individual part, so a quick sketch should convince you for the whole setup.

6. Jan 14, 2010

jasper10

its 35.23 degrees according to Mr Snell and his law :P

7. Jan 15, 2010

labview1958

For air/water surface its 30 degrees. Definetly for air/glass surface is NOT 30 degrees. Do you agree?

8. Jan 15, 2010

modulus

Right, from water to air, the incident angle is 30, and you can figure out the refracted angle (at the water/air interface, made with the normal) using "Mr. Snell's" law.

Now, if the water/air (it started from water, and, is entering into air) interface and the air/glass (it started from air, and, is entering into glass) interface are parallel (so that their normal's are parallel), you can figure out the incident angle for the air/glass interface ; it will be equal to the refracted angle at the water/air interface (using the simple properties of parallel lines and transversals).

So, no, the incident angle for the air/glass interface and the water/air interface will not be the same. I think that should answer your question.

Well, now that you've got your incident angle for the air/glass interface (it started from air, and is entering into glass), I want you to apply some logic and figure out what will be the angle of refraction when this same light ray exits glass and enters back into air?

P.S.:- Look at the bold stuff. It points to the logic your friend is using to derive his answer. But, he's gone wrong somewhere in between

Last edited: Jan 15, 2010
9. Jan 15, 2010

labview1958

The problem lies with the water/glass boundary. How can Mr. Snell help there? The refractive index of glass with respect to water? How to resolve that?

10. Jan 15, 2010

jasper10

Sorry, my previous answer was wrong, i didnt read the question correctly.

Step one: n1sin1 = n2sin2 (refractive index of air = 1)

(1)(sin30) = (1.3)(sinx)

-> x = 22.6 degrees

Step 2

n1sin1 = n2sin2

(1.3)(sin22.6) = (1.5)(siny)

-> y=19.47degrees

Step 3

n1sin1=n2sin2
(1.5)sin19.47 = (1)(sinz)

-> z = 30 degrees.

11. Jan 15, 2010

mgb_phys

It's exactly the same law n1 sin1 = n2 sin2, you are just starting with n=1.33 and going into n=1.5

12. Jan 16, 2010

labview1958

The calculations is correct. But how to explain the physics of it?

13. Jan 26, 2010

labview1958

Anyone care to explain the physics of it?

14. Jan 26, 2010

rl.bhat

In a parallel sided glass slab light is laterally shifted i.e. incident and refracted rays in the same medium are parallel to each other, whatever may be the number of different media in between medium. So the angle of incidence is equal to the angle of emergence.

15. Jan 26, 2010

MATLABdude

16. Jan 26, 2010

jasper10

Imagine a shopping trolly: if u push it from a smooth medium (eg marble) at an angle onto a rough concrete medium (more friction), one wheel reaches the rough medium first and thus slows down first. this causes a change of direction in which the trolley is travelling.

17. Jan 29, 2010

labview1958

"light is laterally shifted"

What physics is that?

18. Jan 29, 2010

ehild

One explanation is the analogy with mechanics. Photons have energy and momentum. Their energy is E=h*f, the magnitude of the momentum is p=h/lambda, and its direction points in the direction of propagation of the light ray. You know that that momentum changes when same force acts on the particle, the change of the momentum is equal to the impulse, and is parallel to the force applied. A plane surface can act only along its normal (there is no friction). The parallel component of the momentum does not change when the photon crosses the interface between two media (or reflects from it). This parallel component is h/ lambda*sin(alfa) which is constant everywhere in a plane-parallel arrangement of layers. But lambda =v/f (f a frequency, v is the speed of light in the medium.) The refractive index of the medium is n=c/v.

So the constancy of the parallel component of momentum involves the constancy of $$sin(\alpha) / \lambda = sin(\alpha) f*n/c$$. As the frequency of the photon does not change we arrived at Snell's law $\sin(\alpha)*n=const$.

The normal component of the momentum will change, but we know that the magnitude of the momentum is h/lambda=hf/c *n. Thus the normal component of the photon momentum is

$$p_n= hf/c*\sqrt{n^2-(n_0\sin{alpha_0})^2}$$

Where n0 is the refractive index of the medium from where the light arrived and alpha0 is the angle of incidence.
If n>n0, the normal component of the momentum increases when the light enters into the other medium while the parallel component remains the same, that is while the ligth ray encloses a smaller angle with the normal in a "denser" medium as in air.

ehild


# BALL BOUNCING INFINITELY to find distance covered

1. Feb 18, 2010

### abrahamrenns

ok, the qn is..
a ball is dropped from H height. it bounces with restitution e. hw much distance will it cover before it comes to rest..? surely, it is not infinity if i am not mistaken, since the bounces become infinitesimally small and then it tends to zero.. thnx in advance for any help..

2. Feb 18, 2010

### xlines

What did you try to solve your problem?

If on every bounce ball loses some fixed percentage of it's momentum, then you should calculate path traveled depending on starting momentum and sum it up. I am pretty sure you should get geometric sum.

3. Feb 18, 2010

### GRDixon

You have more or less rediscovered Zeno's paradox. But you're instincts are correct. The key is that the bounces become infinitesimally small, and no matter how great a finite number of bounces (finite amount of time) the distance traveled with always be finite.

4. Feb 18, 2010

### abrahamrenns

can some one plz take the pains to actually calculate it? it wudnt be difficult for a few here atleast.. i am not able to do it..

5. Feb 18, 2010

### xlines

Well, we do have assignments forums, but here you go. First, what distance will travel ball with upwards initial velocity v' ?

v(t) = v' - gt

it will reach max. height in t' = v'/g . Total distance traveled in one jump will be

d(v') = 2*1/2*g*t'$$^{2}$$ = v'$$^{2}$$/g

After each bounce starting velocity is lowered by factor $$\alpha$$ . So total distance is

D = H + v'$$^{2}$$/g + ($$\alpha$$ v')$$^{2}$$ /g + ($$\alpha$$$$^{2}$$ v')$$^{2}$$ /g + ... = H + v'$$^{2}$$/g (1+$$\alpha$$$$^{2}$$ + $$\alpha$$$$^{4}$$ + ... )

Substitution $$\beta$$ = $$\alpha$$$$^{2}$$
allows you to calculate infinite geometric sum.

Use energy conservation to link starting height H with v' .

Last edited: Feb 18, 2010
6. Feb 18, 2010

### HallsofIvy

Staff Emeritus
That's getting more complicated than necessary!

The original problem told us that "it bounces with restitution e" which means that if it was dropped from height h, then it bounces up to height eh on the first bounce, $e(eh)= e^2h$ on the second, etc. Because it goes the same distance up as down, the total distance will be $h+ 2eh+ 2e^2h+ \cdot\cdot\cdot$, almost a geometric series. We can make it a geometric series by adding and subtracting h: $-h+ 2h+ 2eh+ 2e^2h+ ...$ where everything after the first "-h" is a gemetric series with first term 2h and constant ratio e. That total distance is
$$-h+ \frac{2h}{1- e}= \frac{-h+ +eh+ 2h}{1- e}= \frac{1+e}{1- e}h$$

7. Feb 18, 2010

### Phyisab****

Yep it's a nice problem to work out.

Last edited: Feb 18, 2010
8. Feb 18, 2010

### Saw

That is a nice solution. And if you wanted to fine-tune it... would it be possible to take into account that with every bounce, the ball gets deformed, less elastic and the coefficient of restitution diminishes?

9. Feb 19, 2010

### xlines

English is not my native and, to tell you the truth, I thought e plays role something like my $$\alpha$$. I too learned something today! Thanks for clearing that up! :)

10. Apr 15, 2010

### Zeus0

It's about right except that on rebounce it's not $$eh$$ but $$e^{2}h$$.
by definition $$e = \frac{v_2}{v_1} = \frac{\sqrt{2gh_2}}{\sqrt{2gh_1}}$$ or $$e = \sqrt{\frac{h_2}{h_1}}$$ . Look at the wikipedia entry at http://en.wikipedia.org/wiki/Coefficient_of_restitution" [Broken]

Meaning the finale answer is $$D = \frac{1+e^2}{1-e^2}h$$ . I also took the liberty to calculate the time it would take $$T = \frac{1+e}{1-e}\sqrt{\frac{2h}{g}}$$

I am more curious about weather or not real superball or bouncy balls rebounce an infinite number of time . It is likely not because of imperfections they may have or because of other processes in the way . I would estimate a real superball bounces between 20 to 50 times before resting.

Last edited by a moderator: May 4, 2017


How is AM-GM supposed to be used to prove an inequality

I have recently started learning proofs involving inequalities and came across the AM-GM inequality, which seems like a quite powerful tool.

However, I am not sure I understand how to use this tool properly, and I was wondering if there are acceptable strategies to be aware of when making use of the AM-GM inequality.

I have also tried solving an inequality involving AM-GM to learn how to use this tool as I go, but I'm not sure if what I've done so far is a valid approach.

Here is the question:

Prove that if $$x, y, z, w ≥ 0$$,

$$\frac{x+y+z+w}{4} ≥ \sqrt[4]{xyzw}$$

Here is what I have done so far:

I noticed that $$\sqrt[4]{xyzw}$$ = $$\sqrt{\sqrt{xy}\sqrt{zw}}$$, and then used AM-GM, like so:
I let
$$a = \sqrt{xy}$$
$$b= \sqrt{zw}$$

to make a use of $$\frac{a+b}{2} ≥ \sqrt{ab}$$.
And, then, I subbed in the values:

$$\frac{\sqrt{xy}+\sqrt{zw}}{2} ≥ \sqrt{\sqrt{xy}\sqrt{zw}}$$.

Now I have a feeling I'm supposed to somehow make a use of the inequality ($$\frac{a+b}{2} ≥ \sqrt{ab}$$) once more, however, I am not exactly sure how I should go about doing it.

Any tips for a newbie like myself would be immensely helpful! (Perhaps a link I can refer to, an article, etc)

Thanks a lot in advance for any help!

• What's wrong with using AM-GM on four numbers directly?
– user239203
Jan 4 '20 at 23:25
• I just picked this inequality as a starting point to prove it using AM-GM for two variables first, and get exposed to the AM-GM inequality. I am eager to learn how to use this tool when dealing with inequalities requiring formal mathematical proofs. Jan 4 '20 at 23:28
• Did you mean $\sqrt{xy}+\sqrt{zw}$ where you wrote $\sqrt{zw}+\sqrt{zw}$? Jan 4 '20 at 23:34
• Yes, I'm sorry! Fixed. Jan 4 '20 at 23:36
• This doesn't specifically pertain to the problem, but in general here are two sources that may help you: artofproblemsolving.com/wiki/index.php/… brilliant.org/wiki/arithmetic-mean-geometric-mean Jan 4 '20 at 23:51

Start with $$\dfrac{a+b}{2} \ge \sqrt{ab}$$. To prove this, write it as $$\dfrac{a-2\sqrt{ab}+b}{2} \ge 0$$, and the left side is $$\dfrac{(\sqrt{a}-\sqrt{b})^2}{2} \ge 0$$.

Then,

$$\begin{array}\\ \dfrac{a+b+c+d}{4} &=\dfrac{a+b}{4}+\dfrac{c+d}{4}\\ &=\dfrac{\dfrac{a+b}{2}}{2}+\dfrac{\dfrac{c+d}{2}}{2}\\ &\ge\dfrac{\sqrt{ab}}{2}+\dfrac{\sqrt{cd}}{2}\\ &=\dfrac{\sqrt{ab}+\sqrt{cd}}{2}\\ &\ge\sqrt{\sqrt{ab}\sqrt{cd}}\\ &=\sqrt{\sqrt{abcd}}\\ &=\sqrt[4]{abcd}\\ \end{array}$$

By induction on $$n$$, with this technique you can show that $$\dfrac{\sum_{k=1}^{2^n}a_k}{2^n} \ge \sqrt[2^n]{\prod_{k=1}^n a_k}$$.

To show this is true for any $$m < 2^n$$, let $$a_j =\dfrac{\sum_{k=1}^m a_k}{m}$$ for $$j \gt m$$ and see what happens.

As a matter of fact, this was Cauchy's original proof.

Here's the details (added later).

The left side is, letting $$a = \dfrac{\sum_{k=1}^m a_k}{m}$$,

$$\begin{array}\\ \dfrac{\sum_{k=1}^{2^n}a_k}{2^n} &=\dfrac{\sum_{k=1}^{m}a_k}{2^n}+\dfrac{\sum_{k=m+1}^{2^n}a_k}{2^n}\\ &=\dfrac{\sum_{k=1}^{m}a_k}{m}\dfrac{m}{2^n}+\dfrac{\sum_{k=m+1}^{2^n}a}{2^n}\\ &=\dfrac{am}{2^n}+\dfrac{(2^n-m)a}{2^n}\\ &=\dfrac{am}{2^n}+\dfrac{2^na}{2^n}-\dfrac{ma}{2^n}\\ &= a\\ &=\dfrac{\sum_{j=1}^ma_j}{m}\\ \end{array}$$

Similarly, the right side is, letting $$a_j =b =\left(\prod_{k=1}^{m} a_k\right)^{1/m}$$ for $$j > m$$,

$$\begin{array}\\ \sqrt[2^n]{\prod_{k=1}^{2^n} a_k} &=\left(\prod_{k=1}^{2^n} a_k\right)^{1/2^n}\\ &=\left(\prod_{k=1}^{m} a_k\prod_{k=m+1}^{2^n} a_k\right)^{1/2^n}\\ &=\left(\prod_{k=1}^{m} a_k\right)^{1/2^n}\left(\prod_{k=m+1}^{2^n} a_k\right)^{1/2^n}\\ &=\left(b^m\right)^{1/2^n}\left(\prod_{k=m+1}^{2^n} b\right)^{1/2^n}\\ &=b^{m/2^n}\left(b^{2^n-m}\right)^{1/2^n}\\ &=b^{m/2^n}b^{(2^n-m)/2^n}\\ &=b\\ &=\left(\prod_{k=1}^{m} a_k\right)^{1/m}\\ \end{array}$$

Therefore $$a \ge b$$ or $$\dfrac{\sum_{j=1}^ma_j}{m} \ge \left(\prod_{k=1}^{m} a_k\right)^{1/m}$$.

$$\frac{x+y+z+w}{4}\ge\frac{\sqrt{xy}+\sqrt{zw}}{2}\ge\sqrt[4]{xyzw}$$

• Thanks a lot! Could you just explain in further detail what you did here? I am quite new to proofs and more specifically inequality proofs involving AM-GM. Jan 4 '20 at 23:31
• @FlavioEsposito I used the $2$-variables AM-GM three times, twice to create two square roots & once more for the fourth root.
– J.G.
Jan 4 '20 at 23:40
• I see. So, just to make sure I got it right: You used AM-GM once for $\sqrt{xy}$, once for $\sqrt{zw}$, and then for $\sqrt[4]{xyzw}$? Jan 4 '20 at 23:47
• Yep, that's right! Jan 4 '20 at 23:50
• For any values $a$, $b$, $x$, and $y$, if $\color{red}{a}\ge \color{red}{x}$ and $\color{blue}{b} \ge \color{blue}{y}$, then $\color{red}{a}+\color{blue}{b} \ge \color{red}{x}+\color{blue}{y}$. To see why: $$a \ge x \\ a+b \ge x+b \ge x+y$$ We know that $\color{red}{\frac{x+y}{2}} \ge \color{red}{\sqrt{xy}}$ and $\color{blue}{\frac{z+w}{2}} \ge \color{blue}{\sqrt{zw}}$ by AM-GM. Apply the result above and you have that relation. Jan 6 '20 at 15:08


# Compute the following line integral along a path of your choice (Finding potential)

Consider the following vector field:

$$\vec A(x,y,z)=(yz)\hat i+(xz)\hat j+(xy)\hat k$$

Compute the line integral of $A$ along a path of your choice connecting $(0,0,0)$ to $(1,1,1).$

I recognise that $\nabla\times A=0$ and so I can simply evaluate $V(1,1,1)-V(0,0,0)$ where $A=\nabla V$.

I'm not sure how to find the function $V$ though.

The solution says $V=xyz.$

• Added finding potential into your title. – MrYouMath May 16 '16 at 21:06

Assume V as a function of x,y and z.

Then $\nabla V=(\dfrac{\partial V}{\partial x},\dfrac{\partial V}{\partial y},\dfrac{\partial V}{\partial z})$

Compare components:

$$\dfrac{\partial V}{\partial x}=yz$$ $$\dfrac{\partial V}{\partial y}=xz$$ $$\dfrac{\partial V}{\partial z}=xy$$

Integrate: $$V=xyz+f_1(y,z)$$ $$V=xyz+f_2(x,z)$$ $$V=xyz+f_3(x,y)$$

From here you can see that $V=xyz+const.$ by inspection. If you want to do it mathematically you have to subtract two equations from each other.

1-2: $f_1(y,z)=f_2(x,z)$ from that you can conclude $f_1(y,z)=f_1(z)$ and $f_2(x,z)=f_2(z)$, or you would have $y$ on the left but no $y$ on the right, and so forth.

1-3: $f_1(z)=f_3(x,y)$.As one can see we have z on the left sid but no z on the right. Hence, $f_1$ is a constant function as it is not depending on $z$. if $f_1=const.$ $f_1=f_3(x,y)$ will imply that $f_3=f_1=const.$. Same argument as before and we can conclude $f_1=f_3=const$. But if $f_1=const.$ than from 1-2 $f_2=const$.

With that we obtain $f_i=const$ for $i=1,2,3$. At the end you will see, that $f_i=const$ for $i=1,2,3$.

• I don't understand how you've gone from $f_1(y,z)=f_2(x,z)$ to $f_1(y,z)=f_1(z).$ – Si.0788 May 16 '16 at 21:10
• The equation tells you, that we have something with y and z on the left hand side and something with x and z on the right side of the equation. But it is not possible to have y only on one side of the equation, hence it must vanish and $f_1$ can only be a function of z. The same argument works for $f_2$. – MrYouMath May 16 '16 at 21:13
• Ok, that makes sense. Now how do you conclude that $f_i=c$? – Si.0788 May 16 '16 at 21:15

$\nabla G = A$

what is G?

$G = \int yz \,dx + f(y,z) = \int xz \,dy + g(x,z) = \int xz \,dz + h(x,y)\\ G = xyz + f(y,z) = xyz + g(x,z) = xyz + h(x,y)$

$f(y,z), g(x,z), h(x,y)$ must all be constant functions, and they can be any constant function, so might as well make them $0.$


# Using a Direct Proof to show that two integers of same parity have an even sum?

I seem to be having a lot of difficulty with proofs and wondered if someone can walk me through this. The question out of my textbook states:

Use a direct proof to show that if two integers have the same parity, then their sum is even.

A very similar example from my notes is as follows: Use a direct proof to show that if two integers have opposite parity, then their sum is odd. This led to:

Proposition: The sum of an even integer and an odd integer is odd.

Proof: Suppose a is an even integer and b is an odd integer. Then by our definitions of even and odd numbers, we know that integers m and n exist so that a = 2m and b = 2n+1. This means:

a+b = (2m)+(2n+1) = 2(m+n)+1 = 2c+1 where c=m+n is an integer by the closure property of addition.

Thus it is shown that a+b = 2c+1 for some integer c so a+b must be odd.

## ----------------------------------------------------------------------------

So then for the proof of showing two integers of the same parity would have an even sum, I have thus far:

Proposition: The sum of 2 even integers is even.

Proof: Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2m???

• So now that you have $a = 2n$ (you have a typo) and $b = 2m$, we need to talk about the sum of $a$ and $b$, so look at $a+b = 2n+2m$. Can you show that this sum is even? – Mike Pierce Jan 28 '16 at 16:45
• Yes, and so? (Once you've made the correction to $b=2n$, ) mimic the proof of the result in your notes and factor out the $2$... Now what's the other fork in the road? Well, that the two integers are both odd. Unfold the definition of "odd" similarly, add the resulting expressions, factor out the $2$, ... . – BrianO Jan 28 '16 at 16:46
• Just as a comment for future reference, note that this follows easily from the fact that $2=0 \mod 2$. That is, $2x=0 \mod 2$ for $x=1$ or $x=0$. – Aloizio Macedo Jan 28 '16 at 16:48
• @AloizioMacedo That's true, of course, but it may be too abstract an approach. – BrianO Jan 28 '16 at 16:50

"Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2m???"

Since a and b are different numbers they should be different m and n.

"Suppose a is an even integer and b is an even integer. Then by our definitions of even numbers, we know that integers m and n exist so that a=2m and b=2*n*?

And so a + b = 2m + 2n = 2(m+n) and as m+n =c for some integer c, a + b = 2c so by definition a + b is even.

Yes, you can use the definitions directly. If $a,b$ are even then like you say we have $a = 2m$ and $b = 2n$, so $a+b = 2m + 2n = 2(m+n)$, which is even.

Similarly, if $a,b$ are odd then we have $a = 2m + 1$ and $b = 2n + 1$, and so $a+b = (2m +1) + (2n + 1) = 2(m + n + 1)$, which is also even.

• thanks for replying. So since the resulting integer sum of (a+b) always ends up being multiplied by (2), it will always yield an even sum? – Analytic Lunatic Jan 28 '16 at 17:28
• @AnalyticLunatic Yes, since by definition an even integer is one of the form $2\cdot \text{integer}$. – Alex Provost Jan 28 '16 at 17:32
• So then, how would this change if say, we were looking at a product instead of a sum? – Analytic Lunatic Jan 28 '16 at 19:32
• @AnalyticLunatic Can you put $2m \cdot 2n$ in the form $2 \cdot \text{integer}$? Can you put $(2m+1)\cdot(2n+1)$ in the form $2\cdot \text{integer}+1$? – Alex Provost Jan 28 '16 at 21:13
• Is it sufficient to prove using only the even case? If it is necessary to provide the odd case as well to prove the theorem, then how is it considered a "direct proof" rather than "proof by cases"? – Michael Fulton Apr 13 '17 at 0:23


Expected distances relating to points on a stick

Question

Two points are randomly and independently located on a stick of length $$1$$ m.

$$(a)\quad$$ Find the expected distance between the two points.

$$(b)\quad$$ Find the expected distance from the left end of the stick to the point which is closest to that end.

$$(c)\quad$$ Find the expected distance from the left end of the stick to the first of the two points, given that that point is closer to the left end than to the right end.

My working

$$(a)\quad$$ Let $$X\sim U(0, 1)$$ and the two points be $$X_1$$ and $$X_2$$.

$$\implies f_{X_1, X_2}(x_1, x_2) = 1,\quad 0 < x_1 < 1\quad, \quad 0 < x_2 < 1$$

\begin{aligned}[t] \mathbb{E}(\lvert X_1 - X_2 \rvert) & = \int^{\infty}_{-\infty}\int^{\infty}_{-\infty} (\lvert x_1 - x_2 \rvert) f_{X_1, X_2}(x_1, x_2)\ \mathrm{d}{x_1}\ \mathrm{d}{x_2} \\[1 mm] & = \int^1_0\int^{x_1}_0 (x_1 - x_2)\ \mathrm{d}{x_2}\ \mathrm{d}{x_1} + \int^1_0\int^1_{x_1} (x_2 - x_1)\ \mathrm{d}{x_2}\ \mathrm{d}{x_1} \\[1 mm] & = \frac 1 3 \end{aligned}

$$(b)\quad \frac 1 3$$

$$(c)\quad \frac 1 3$$

I know my answer to $$(a)$$ is correct and it also follows intuition - if two points are chosen randomly and independently along a distance of $$1$$ m, one would naturally expect them to be spaced out at equal distances.

However, I am unsure if my answers to $$(b)$$ and $$(c)$$ are correct - I used intuition here as well, but how would one derive the answers to $$(b)$$ and $$(c)$$ mathematically?

Any intuitive explanations will be greatly appreciated :)

• There is no essential difference with choosing randomly 3 points on a circle that has circumference of 1m and then using the first chosen point as the place where the circle is "opened" so that it receives a left end and a right end. In this described situation we can use symmetry and find directly $\frac13$ for expected (arc)distance between the points. Just like you I have the impression that the questions (b) and (c) are actually the same. – drhab May 4 at 12:09

(b) Let $$Y=\min\{X_1,X_2\}$$. Let's find the pdf of $$Y$$. Let $$F$$ be the cdf of $$X$$ and $$f$$ be the pdf.

$$\begin{split}\Pr(Y> y)&=\Pr(X_1> y)\Pr(X_2>y)\\ &=\left(1-F(y)\right)^2\end{split}$$

Then the cdf of $$Y$$ is

$$\begin{split}G(y)&=1-\Pr(Y>y)\\ &=1-(1-F(y))^2\end{split}$$

The pdf of $$Y$$ is the derivative

$$\begin{split}g(y)&=-2(1-F(y))(-f(y))\\ &=2f(y)(1-F(y))\\ &=2(1-y)\end{split}$$

(These are fairly standard computations/results, but I repeated them here anyway.)

This has expected value $$\int_0^12(y-y^2)dy=2\left[\frac {y^2}{2}-\frac{y^3}{3}\right]\bigg|_0^1=\frac 13$$

(c) We seek $$\mathbb E(Y|Y<\frac 12)$$. This will involve a reweighing of the density using $$\int_0^{1/2}2(1-y)dy=2\left[y-\frac{y^2}2\right]_0^{1/2}=\frac 34$$. Then the density of $$Y|Y<1/2$$ is $$\frac{2(1-y)}{3/4}, 0

This has expectation $$\int_0^{1/2}\frac 83(y-y^2)dy=\frac 83\left[\frac{y^2}2-\frac{y^3}{3}\right]_0^{1/2}=\frac 83\left(\frac 18-\frac 1{24}\right)=\frac 29$$

If we know the minimum is closer to the left end, then the expectation is slightly closer to the left end.

• Thank you for your answer! I understand everything except, ironically, the very first part. How did you get $\mathbb{P}(Y > y) = \mathbb{P}(X_1 > y)\mathbb{P}(X_2 > y)$? Apologies if this is supposed to be trivial... – Ethan Mark May 4 at 15:44
• you're welcome! It's from: $\mathbb P(Y>y)=\mathbb P(\min\{X_1, X_2\}>y)=\mathbb P(X_1>y, X_2>y)=\mathbb P(X_1>y)\mathbb P(X_2 >y)$, due everything having to be bigger than the value if the minimum is to be bigger, and then independence of $X_1, X_2$. – Stacker May 4 at 16:35
• Right! That makes sense! :) – Ethan Mark May 4 at 16:53
• (Definition of minimum actually I think) – Stacker May 4 at 16:55


# $\sum_{k=0}^{n} a_{k}=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} +\sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}$

I would like to show that \begin{align} \sum_{k=0}^{n} a_{k}&=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}\\ \end{align}

• I'm interested in more ways of prove it

My proof.

\begin{align} \sum_{k=0}^{n} a_{k}&=\sum_{\substack{k=0 \\ k \text{ is even }}}^{n} a_{k}+\sum_{\substack{k=0 \\ k \text{ is odd }}}^{n} a_{k}\\ &=\sum_{\substack{k=0 \\ k=2k' \text{ with } k'\in\mathbb{Z}}}^{n} a_{k}+\sum_{\substack{k=0 \\ k=2k'+1 \text{ with } k'\in\mathbb{Z}}}^{n} a_{k}\\ &=\sum_{\substack{k=0 \\ k'=\frac{k}{2} }}^{n} a_{2k'}+\sum_{\substack{k=0 \\ k'=\frac{k-1}{2} }}^{n} a_{2k'+1}\\ &=\sum_{\substack{k=0 \\ k'=\frac{k}{2}\\ k=0 \implies k'=0 \\ k=n \implies k'=\frac{n}{2}}}^{n} a_{2k'}+\sum_{\substack{k=0 \\ k'=\frac{k-1}{2}\\ \text{since k is odd can start with 1 and not 0 } k=1 \implies k'=0 \\ k=n \implies k'=\dfrac{n-1}{2} }}^{n} a_{2k'+1}\\ &=\sum_{k'=0}^{ n/2 } a_{2k'} + \sum_{k'=0}^{ (n-1)/2 }a_{2k'+1}\\ &\text{If $n$ is even, then $\frac{(n−1)}{2}$ is not an integer, which is why we need the floor.}\\ &\text{Similarly, if $n$ is odd, then $\frac{n}{2}$ is not an integer}\\ \sum_{k=0}^{n} a_{k}&=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1} \end{align}

• Is my proof correct
• I'm interested in more ways of prove it
• so that you don't have to worry that: even number may take odd value and vice versa – SiXUlm Oct 29 '15 at 12:36
• also, a small typo in the first line of your proof: in the second summation, $k$ should start from 1 instead of 0. – SiXUlm Oct 29 '15 at 12:37
• If $n$ is even, then $(n-1)/2$ is not an integer, which is why you need the floor. Similarly, if $n$ is odd, then $n/2$ is not an integer. – Mankind Oct 29 '15 at 12:37
• @HowDoIMath yes i see that's why i have to add floor thanks. what about my proof – Educ Oct 29 '15 at 12:43
• well, shoot. Yes, your idea is correct and what you are trying to express is clear. I'm not sure your notation of indexing is technically legitimate however. Normally one really shouldn't get bogged do in details like that. However in this case what you are trying to prove is simply "The sum of all terms is the sum of the even terms plus the sum of the odd terms" (which is obvious) and your proof is verifying that the reindexing is valid. – fleablood Oct 29 '15 at 13:15

$\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k}= \sum_{i=0; i\ is\ even}^{2\lfloor n/2 \rfloor} a_{i} = \sum_{i=0; i\ is\ even}^{n} a_{i} = \sum_{k=0; k\ is\ even}^{n} a_{k}$

$\sum_{k=0}^{\lfloor (n-1)/2 \rfloor} a_{2k + 1}= \sum_{i=0; i\ is\ odd}^{2\lfloor (n-1)/2 \rfloor + 1} a_{i} = \sum_{i=0; i\ is\ odd}^{n} a_{i}= \sum_{k=0; k\ is\ odd}^{n} a_{k}$

$\sum_{k=0}^n a_n = \sum_{k=0; k\ is\ even}^{n} a_{k} + \sum_{k=0; k\ is\ odd}^{n} a_{k} = \sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor} a_{2k + 1}$

• i think in the second line $i=1$ not $0$ since $i=2k+1$ – Educ Oct 29 '15 at 14:15

If $n$ is odd, i.e. $n=2m+1$,

then $k=0, 1, 2, 3, ..., 2m+1=\underbrace{(0, 2, 4, 6, .., \color{blue}{2m})}_{\underset{k=0, 1, ..., \lfloor n/2\rfloor}{2k}},(\underbrace{1, 3, 5, ..., 2m-1, \color{red}{2m+1}}_{\underset{k=0, 1, ..., \lfloor (n-1)/2\rfloor}{ 2k+1}})$
as \begin{align} &2\bigg\lfloor \frac n2 \bigg\rfloor&&=2\bigg\lfloor \frac {2m+1}2\bigg\rfloor&&=2\bigg\lfloor m+\frac 12 \bigg\rfloor&&=\color{blue}{2m}\\ &2\bigg\lfloor \frac {n-1}2 \bigg\rfloor+1&&=2\bigg\lfloor\frac{2m}2\bigg\rfloor+1&&&&=\color{red}{2m+1}\end{align}

If $n$ is even, i.e. $n=2m$,

then $k=0, 1, 2, 3, ..., 2m=\underbrace{(0, 2, 4, 6, .., \color{green}{2m})}_{\underset{k=0, 1, ..., \lfloor n/2\rfloor}{2k}},(\underbrace{1, 3, 5, ..., \color{orange}{2m-1}}_{\underset{k=0, 1, ..., \lfloor (n-1)/2\rfloor}{ 2k+1}})$
as \begin{align} &2\bigg\lfloor \frac n2 \bigg\rfloor&&=2\bigg\lfloor \frac {2m}2\bigg\rfloor&&=\color{green}{2m}\\ &2\bigg\lfloor \frac {n-1}2 \bigg\rfloor+1&&=2\bigg\lfloor\frac{2m-1}2\bigg\rfloor+1=2\underbrace{\bigg\lfloor m-\frac12\bigg\rfloor}_{m-1}+1=2(m-1)+1&&=\color{orange}{2m-1}\end{align}

Hence the formula $$\sum_{k=0}^{n} a_{k}=\sum_{k=0}^{\lfloor n/2 \rfloor} a_{2k} + \sum_{k=0}^{\lfloor (n-1)/2 \rfloor}a_{2k+1}\\$$ holds irrespective of whether $n$ is odd or even.


# Finding the vector equation of a plane in 3 space

I'm working on a question that asks me to find the vector equation of the plane in $$\mathbb R^3$$ that contains the point P(-1,6,0) and is parallel to the plane x+2y-z=5. I'm trying to make sure my answer is right versus the answer that I was provided with, which I think is wrong.

I pulled out the normal vector n = (1,2,-1). I proceeded to find two vectors v and u that are orthogonal to n but are not parallel to each other. I followed the theorem that states that when the dot product of 2 vectors equals zero, those vectors are orthogonal. I came up with v = (1,1,3) and u = (4,1,6). So I ended with the vector equation (x,y,z) = (-1,6,0) + t(1,1,3) + s(4,1,6).

It's my understanding that there are a number of different answers for this problem as there are a number of different vectors, besides the ones I found, that are orthogonal to the normal vector. The answer I was provided for this question stated that the vector equation is (x,y,z) = (-1,6,0) + t(3,-4,1) + s(1,-4,-1). I'm fairly certain that this answer is incorrect as the vectors in the vector equation are not orthogonal to the normal equation. Is my thinking correct?

The plane parallel to $$x+2y-z=5$$ containing $$(-1,6,0)$$ is $$x+2y-z=-1+2(6)-0=11$$.
Your parametrization satisfies that: $$(-1+t+4s)+2(6+t+s)-(3t+6s)=11$$.
The other answer does not: $$(-1+3t+s)+2(6-4t-4s)-(t-s)\not=11$$ generally.


# Closure of Intersection is Subset of Intersection of Closures

I'm trying to prove the following problem from a book I found:

Let $X$ be a topological space and let $\mathscr{A}$ be a collection of subset of $X$. Prove
$\overline{ \bigcap \limits_{A \in \mathscr{A}} A}\subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

*where the over line indicates closure.

First I'm going to show an example the them being equal, and then show an example of a proper subset. I know the examples are not needed for the proof, but I find them insightful, and these posts are like a notebook that I can refer back to later. Then I will attempt to prove this; I actually had a very difficult time with this one, and I feel like I'm missing something. In any case, please let me know If my examples and proof are valid, and of course alternative proof are very welcome.

(I) Example of $\overline{ \bigcap \limits_{A \in \mathscr{A}} A} = \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

I find that with "most" collections of subsets, the two sides come up equal. Let $X$ be $\mathbb{R}$ with the standard Euclidean metric. Also let, $\mathscr{A}=\{(1,6),(3,10)\}$. So then $\bigcap \limits_{A \in \mathscr{A}} A= (3,6)$, and $\overline{ \bigcap \limits_{A \in \mathscr{A}} A} =[3,6]$. Next the right side would be: $\bigcap \limits_{A \in \mathscr{A}} \overline{A}= [1,6] \cap [3,10]=[3,6]$. So it is possible for the two sides to be equal.

(II) $\overline{ \bigcap \limits_{A \in \mathscr{A}} A}\subset \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

It took me a while to find an example of this, but I found that if the collection of subsets consist of infinite sets that converge to an empty set, there will be a proper subset. I also found this example, and it uses an empty set as well. Is it possible for this to be true without an empty set??

Let $X$ be $\mathbb{R}$ with the standard Euclidean metric. Also let, $\mathscr{A}=(0,\frac{1}{n}), n \in \mathbb{N}$. Now, $0 \notin \bigcap \limits_{A \in \mathscr{A}} A$, and any positive number can be removed with a large enough $n$, thus $\bigcap \limits_{A \in \mathscr{A}} A = \varnothing$. The empty set is both open and closed ergo, $\overline{ \bigcap \limits_{A \in \mathscr{A}} A} = \varnothing$. On the other hand, $0 \in \overline{A}$, therefore, $\bigcap \limits_{A \in \mathscr{A}} \overline{A}=$ {$0$}. So it is possible for the closure of intersections to be a subset of the intersections of closures.

Proof: $\overline{ \bigcap \limits_{A \in \mathscr{A}} A}\subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

I considered many different ways to prove this, but they all lead to dead ends. The only thing I could think of was to build on the fact that $A \subseteq \overline{A}$ for any subset $A$. Thus, $\bigcap \limits_{A \in \mathscr{A}} A\subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$. (Next is the part I feel is not solid) When $\bigcap \limits_{A \in \mathscr{A}} A$ is closed the boundary points that are added will also be points included in $\bigcap \limits_{A \in \mathscr{A}} \overline{A}$. To summarize symbolically:
(a)$\bigcap \limits_{A \in \mathscr{A}} A\subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

(b)$\partial(\bigcap \limits_{A \in \mathscr{A}} A) \subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$
Thus, (a) $\wedge$ (b) $\rightarrow \overline{ \bigcap \limits_{A \in \mathscr{A}} A}\subseteq \bigcap \limits_{A \in \mathscr{A}} \overline{A}$

QED

As stated above, (b) seems intuitively true, and I guess it must be true for the actual statement being proven to be true. But I don't find it obviously true, especially when considering the most general cases of a topological space.

• You are correct that $A \subseteq \overline A$ and therefore $\bigcap A \subseteq \bigcap \overline A$. Now $\bigcap \overline A$ is an intersection of closed sets, hence closed, so $\bigcap \overline A$ is a closed set containing $\bigcap A$. Since by definition $\overline{\bigcap A}$ is the smallest closed set containing $\bigcap A$, we must have $\overline{\bigcap A} \subseteq \bigcap \overline A$. – Bungo Jul 6 '16 at 23:56
• P.S. For a simple example with proper containment, take $A_1 = (0,1)$ and $A_2 = (1,2)$. Then $A_1 \cap A_2 = \emptyset$, so also $\overline{A_1 \cap A_2} = \emptyset$. On the other hand, $\overline{A_1} \cap \overline{A_2} = [0,1] \cap [1,2] = \{1\}$. – Bungo Jul 7 '16 at 0:01
• The intersection is contained in A, so the closure of the former is contained in the closure of the latter. Since this holds for any A, it holds for their intersection. – Steve D Jul 7 '16 at 0:38


# Boundary Condition for Schrödinger Equation in Infinite Range

I am trying to simulate the movement of a coherent state in a quantum harmonic oscilator, but for some reason the answer diverges and there is a warning about not enought boundary conditions.

Also, since I plan on moving to more complex situations in the future, I would like to avoid b.c.s of the kind:

p[t, L] == 0

The reason is that for higher energy situations it will be more taxing to keep L much greater than my area of interest an having the wave get too close to it would cause undesired reflexions.

My code, for a 1D case, is as follows:

w = 1;
L = 3;
c = 1;
usol = NDSolveValue[{I D[p[t, x], t] + 1/2 D[p[t, x], x, x] ==
1/2 w^2 x^2 p[t, x], p[0, x] == E^(-w (x - c)^2/2)*(w/Pi)^(1/4)}
, p, {t, 0, 10}, {x, -L, L}]

• Yes, the b.c. isn't enough, for a initial value problem defined on $-\infty<x<\infty$ you need to add artificial b.c. approximating "infinity". There're many posts about this type of issue, see e.g. mathematica.stackexchange.com/q/128516/1871 – xzczd May 8 '17 at 5:54
• @xzczd, thank you for the hint! I adapted the b.c. and it worked, but I must admit to not undertanding why it did... abc = D[p[t,x], x] + direction p[t,x] == 0 /. {{x -> lb, direction -> -1}, {x -> rb, direction -> 1}}; – ivbc May 8 '17 at 16:00
• I'm a bit surprised :D . I posted the example just to show that artificial boundary is needed, I didn't know ABC is also applicable for 1D Schrodinger's equation. – xzczd May 8 '17 at 16:48
• PLenty of references about it, like: sciencedirect.com/science/article/pii/S0021999108004804. But the subject is complex and I dont know if what I tried is a good answer... – ivbc May 8 '17 at 17:48
• Maybe you can ask a question e.g. "What's the state-of-art/most popular artificial boundary condition for 1D Schrodinger's equation" in scicomp.stackexchange.com ? – xzczd May 9 '17 at 5:50

Since OP has found this interesting post, let me try to implement the exterior complex scaling method mentioned there.

First, make the transform $x= \left\{\begin{array}{cc} & \begin{array}{cc} -R_0+e^{i \theta } (\xi +R_0) & -\xi >R_0 \\ R_0+e^{i \theta } (\xi -R_0) & \xi >R_0 \\ \xi & -R_0\leq \xi\leq R_0 \\ \end{array} \\ \end{array}\right.$, I'll use DChange for the task:

set = {I D[p[t, x], t] + 1/2 D[p[t, x], x, x] == 1/2 w^2 x^2 p[t, x],
p[0, x] == E^(-w (x - c)^2/2)*(w/Pi)^(1/4)};

right = Exp[I θ] (ξ - R0) + R0;
left = Exp[I θ] (ξ + R0) - R0;
middle = ξ;

coevalue = CoefficientList[
SimplifyPWToUnitStep@
Piecewise[{{right, ξ > R0}, {left, -ξ > R0}}, middle], ξ];

neweq = DChange[set, x == coe@0 + coe@1 ξ, x, ξ, p[t, x]] /.
Thread[(coe /@ {0, 1}) -> coevalue];

(* Alternative approach for deducing neweq: *)
help = DChange[#, x == #2, x, ξ, p[t, x]] &;
change = Piecewise[{{help[#, right], ξ > R0}, {help[#, left], -ξ > R0}},
help[#, middle]] &;

neweq = SimplifyPWToUnitStep@Map[change@# &, set, {2}];

Notice currently DChange doesn't directly support piecewise function so the coding is a little roundabout, but I think it's still simpler than transforming by hand.

Remark

SimplifyPWToUnitStep is an undocumented function that expands Piecewise into a combination of UnitStep. I use this function to "extract" ξ from the piecewise part, or CoefficientList in first approach and NDSolveValue in second approach will fail.

The next step, which is also the final step, is to solve the equation:

w = 1;
L = 3;
c = 1;
tend = 20;
boundarylayer = L/5; thvalue = 1/2;
mol[n_Integer, o_: "Pseudospectral"] := {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> n,
"MinPoints" -> n, "DifferenceOrder" -> o}}
newsol = NDSolveValue[{neweq,
p[t, -L - boundarylayer] == p[t, L + boundarylayer] == 0} /. {R0 -> L, θ ->
thvalue}, p, {ξ, -L - boundarylayer, L + boundarylayer}, {t, 0, tend},
Method -> mol[25, 4]]; // AbsoluteTiming
DensityPlot[Norm@newsol[t, x], {t, 0, tend}, {x, -L, L}, PlotRange -> All,
PlotPoints -> 100, ColorFunction -> "AvocadoColors", FrameLabel -> {"t", "x"}]

Notice I've manually set the number of spatial grid points, or NDSolveValue will automatically choose a too large one because the initial condition is no longer smooth.

Besides, the choosing of R0 ($R_0$), boundarylayer (distance from $R_0$ to the boundary of computational domain) and thvalue ($\theta$) turns out to be a kind of art to make the reflection small enough. There might be some hint in the original paper about the method, but I simply find the proper value by trial and error.

• (+1) You have transformed x and tto xi and theta, right? – zhk May 10 '17 at 7:49
• @zhk Nope, in this transformation, only x is transformed to ξ. θ is a parameter. You can have a look at the linked post for more information. – xzczd May 10 '17 at 8:03
• Does this simplify the problem? In what way this transformation helps? – zhk May 10 '17 at 8:04
• @zhk This transform makes the equation more complicated, of course :) , but by solving this equation instead, we obtain a better approximation for infinite range. (OP wants to solve the equation in $-\infty<x<\infty$. ) – xzczd May 10 '17 at 8:10
• @ivbc Actually this is a function I place in SystemOpen@"init.m" file, because I adjust these options frequently when using NDSolve. (See Method -> mol[25, 4]? It's the same as writing Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> 25, "MinPoints" -> 25, "DifferenceOrder" -> 4}}. ) I adjust these options because, as mentioned above, if I don't manually set "MinPoints" and "MaxPoints", NDSolveValue will choose a too large one because the initial condition is not smooth. (You can take away the option and see what will happen. ) – xzczd May 11 '17 at 3:10

Let's remember Schrodinger's equation:

$i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \left [ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t)$

For the harmonic oscilator $V = x^2$, so your equation is missing a p[x,t] on the RHS besides the boundary conditions. L also needs to be larger too. This seems to work.

w = 2;
L = 10;
c = 3;
usol = NDSolveValue[{I D[p[t, x], t] + 1/2 D[p[t, x], x, x] ==
1/2 w^2 x^2 p[t, x],
p[0, x] == Exp[(-w (x - c)^2/2)*(w/Pi)^(1/4)], p[t, L] == 0,
p[t, -L] == 0}, p, {t, 0, 10}, {x, -L, L}]

DensityPlot[Norm@usol[t, x], {t, 0, 10}, {x, -L/2, L/2},
PlotRange -> All, PlotPoints -> 100, ColorFunction -> "Rainbow"]

update

For completeness purposes only, this is the solution with the abc boundary condition from @xzczd.

w = 1;
L = 3;
c = 1;
usol = NDSolveValue[{I D[p[t, x], t] + 1/2 D[p[t, x], x, x] -
1/2 w^2 x^2 p[t, x] == 0,
p[0, x] == E^(-w (x - c)^2/2)*(w/Pi)^(1/4),
Derivative[0, 1][p][t, -L] - p[t, -L] == 0,
Derivative[0, 1][p][t, L] + p[t, L] == 0},
p, {t, 0, 20}, {x, -L, L}]

DensityPlot[Norm@usol[t, x], {t, 0, 20}, {x, -L/2, L/2},
PlotRange -> All, PlotPoints -> 100, ColorFunction -> "Rainbow",
FrameLabel -> {"t", "x"}]
`

Note how in the first case the wave function starts to diffuse as time passes, so it's not really a coherent state.

• Thank you for spotting the mistake and for the solution. I improved the question a bit to tray to avoid the artificial b.c. p[t, L] == 0, as it must always be far from the area being analysed. – ivbc May 8 '17 at 15:56
• @ivb if with the ABC boundary condition it works, what is your question now? I don't understand. – tsuresuregusa May 9 '17 at 2:04
• @tsuresuregusa I guess it's because there's no guarentee that the simple ABC mentioned in my answer is always applicable. (It's a artificial boundary for 1D wave equation. ) Though currently it seems to work, it may be just a coincidence. (In the comment above, OP has found a paper about ABC for 1D Schrodinger's equation, in which the proposed ABC has a very different form. ) – xzczd May 9 '17 at 5:47
• @xzczd your last comment nails it, I think we are now out of the scope of this site. – tsuresuregusa May 9 '17 at 14:53
• Answer accepted since it solves the problem. The question about why it works is important, and can be further considered here: scicomp.stackexchange.com/questions/15973/… – ivbc May 9 '17 at 22:51


# Does t test only work for continuous random variable?

When using t test normally we would assume the original data follows normal distribution, but if the sample size is large enough, this assumption can be ignored due to Central Limit Theory.

I thought since normal distribution is for continuous random variable, even if the data does not have normality, it at least must be continuous random variable in order to use the t test. However in practice, I found that the t test is widely used even for discrete random variable such as hospital length of stay (LOS) in days (which is integer and thus discrete random variable).

So my question is, is it a common practice to apply t test on discrete random variable? If not, when we want to compare the mean of two groups consisting of discrete random variable, except for Wilcoxon Signed Rank Test, what other tests can I use?

Remember the Central Limit Theorem is talking about the asymptotic distribution of the standardised mean of iid random variables. So even if your random variables are discrete, as you accumulate more and more of them, once you take their mean (and then standardise it), you'll end up with a random variable which acts more and more like a continuous random variable.

For example, if you have 100 Bernoulli random variables (each either 0 or 1), then the possible means are $0.00, 0.01, 0.02, \dots , 1.00$. If you have 1000 then the possible means are $0.000, 0.001, 0.002, \dots , 1.000$.

So even if you have discrete random variables, their mean can still be asymptotically normal.

• Note that the central limit theorem relates not to the mean itself but to a standardized mean. When necessary conditions hold, the sample mean itself is asymptotically just going to go to a constant -- the population mean. – Glen_b -Reinstate Monica Jul 17 '17 at 8:20
• Thank you @Glen_b, you're absolutely right. I just mentally absorbed the standardisation into the variance of the approximate normal for a particular sample, but of course that's silly since it undermines the point of the convergence in distribution result. – RoryT Jul 17 '17 at 8:32
• Thanks for your answer, that helped a lot! But as for central limit theorem, I am a little confused at your comments. The CLT says that 'given certain conditions, the arithmetic mean (or sum) of a sufficiently large number of iterates of independent random variables, each with a well-defined (finite) expected value and finite variance, will be approximately normally distributed, regardless of the underlying distribution'. To my understanding, the sample mean itself is related to CLT already, why does it to be 'standardised mean' like @Glen_b said? Could you shed more light? – user6892253 Jul 17 '17 at 9:33
• No worries. The mean itself is approximately normally distributed if you've got a large enough number of iid variables. However, as you take more and more iid variables, their mean will get closer and closer to the population mean, and will be less and less variable. If you multiply the difference between the sample and population mean by $\sqrt{n}$ then this counteracts the fact that the sample mean is getting closer and closer to the population mean. This is what we mean by standardisation. The standardised mean will be asymptotically distributed as a standard normal (i.e. $N(0,1)$) – RoryT Jul 17 '17 at 10:23

Does T Test only work for continuous random variable?

It depends on what you mean by "work".

When using T test normally we would assume the original data follows normal distribution, but if the sample size is large enough, this assumption can be ignored due to Central Limit Theory.

Not if you care about power.

I thought since normal distribution is for continuous random variable, even if the data does not have normality, it at least must be continuous random variable in order to use the t test.

Your argument that was based on the CLT wouldn't distinguish between discrete and continuous variables -- the CLT applies to either.

However in practice, I found that the t test is widely used even for discrete random variable such as hospital length of stay (LOS) in days (which is integer and thus discrete random variable).

It does get used on discrete data (and on obviously non-normal continuous data, and on data that are neither discrete nor continuous) at least sometimes. Some of those times, it's probably quite reasonable to do so (in that the significance level will be close to the nominal level and the power will be at least adequate).

I would tend to avoid it in that length-of-stay case; leaving aside likely issues with censoring, you have something which may be extremely right skew and even if your sample size were huge, the power may still be poor.

So my question is is it a common practice to apply t test on discrete random variable?

If you're going to apply it in a case where you can be confident your samples are drawn from something that's fairly non-normal you'd probably want to have an argument ready for why it would perform reasonably well.

If not, when we want to compare the mean of two groups consisting of discrete random variable, except for Wilcoxon Signed Rank Test, what other tests can I use?

A signed rank test is a one-sample test (or a paired-sample test), not a two-sample test. It also doesn't compare means (it could reject in the wrong direction, for example)

You might use a permutation test of the difference in means, or make a different parametric assumption (in some situations you might consider a negative binomial assumption for example, or some other discrete distribution -- depending on circumstances), or perhaps add some assumptions to a Wilcoxon-Mann-Whitney that could make it also a comparison of means (though it won't necessarily outperform the t for discrete skewed cases).

• What do you mean my power in your answer? – SpeedBirdNine Jul 17 '17 at 16:31
• en.wikipedia.org/wiki/Statistical_power – Glen_b -Reinstate Monica Jul 17 '17 at 22:17
• @Glen_b Your answer is so compact and helpful, thanks a lot! As for the statistical power you have mentioned, I know that parametric testing tends to have more power than non-parametric testing, but have no idea that the skewness of data would effect the power that much, could you elaborate more? Or is there any good recommended paper for me to learn from? Thanks! – user6892253 Jul 18 '17 at 7:59
• Actually, in many cases widely used parametric tests only tend to have slightly more power than the commonly used nonparametric tests when the assumptions of the parametric test are exactly true. When the assumptions are not true, the power of the nonparametric procedure may be much higher. For example, consider an ordinary equal variance two sample t-test compared to a Wilcoxon-Mann-Whitney. When the data are iid normal, the t-test has about 4.5% better efficiency in large samples (it's like the t-test has 22 observations worth of information every time the WMW has 21). – Glen_b -Reinstate Monica Jul 18 '17 at 8:15
• That's not even the most powerful nonparametric test at the normal. But when the tails are very heavy, the WMW may be vastly more efficient in large samples than the t. But when I said "power may still be poor" I wasn't necessarily advocating nonparametric tests for the discrete skew case (power is sometimes poor for some of those too, though for slightly different reasons). – Glen_b -Reinstate Monica Jul 18 '17 at 8:17

Theoretically, t-test is only for continuous data because discrete data can never meet normality assumption. However, t-test is quite robust given enough samples.

Applying t-test for discrete value is actually quite common. For example, the popular way to test for microarray gene expression array is: moderated t-Test.

https://www.dnastar.com/arraystar_help/index.html#!Documents/moderatedttest.htm

Gene expression is counting data and certainly not continuous. But t-test is simple and good enough.

EDIT:

I think @Glen_b is correct. But, discrete data simply don't satisfy theoretical assumptions, whereas there's a possibility that continuous data do satisfy.

Again he's correct. In my example, the method assumes asymptotic behaviour of the sample means.

EDIT:

t-test is indeed common for discrete test (answer @Glen_b), especially when we have a large sample and the histogram of the distribution "looks" normal anyway (not skewed).

The t-test is simple for everybody to understand. In many practical applications, a good-enough and easy statistical test is sufficient.

• Continuous data that's not normal can never actually meet the normality assumption either (not even on average -- sample means of iid continuous rvs can only have a normal distribution if they were to begin with -- the convergence, whether from discrete or continuous population is only asymptotic either way). I doubt the normality assumption is ever true on real data. – Glen_b -Reinstate Monica Jul 17 '17 at 10:20
• When you say 't test is common for discrete test when we have a large sample and the histogram of the distribution looks normal', what about the skewed discrete data with a large sample size, is there any method to verify whether t test can work well in such case? – user6892253 Jul 18 '17 at 8:19


# Solving a Set Problem

Here is my question

• In a class that has $40$ students, there are $10$ students who could not pass the math exam and $30$ students who passed the english exam. If there are $6$ students who could not pass the both exam, How many are there students who passed the both exam?

I'm currently not able to build the correct equation. Might I get help? It seems like a bit confused. That's why I need get help.

• Hint: use the inclusion/exclusion principle. – user370967 Oct 31 '17 at 16:37
• @Math_QED What is it, sir? I'm already trying on it. Before using inclusion/exclusion principle, I ought to build the correct equation. – user440404 Oct 31 '17 at 16:38
• "group theory" is an incorrect tag; this is a question about sets. – Andrew Tindall Oct 31 '17 at 16:39
• I believe that It seems better now. – user440404 Oct 31 '17 at 16:42
• @Bobtrollsten The inclusion/exclusion principle "gives you the equation," so it would be silly to build the equation before applying the principle. – rschwieb Oct 31 '17 at 16:43

There are $4$ types of people:

Let $A$ be the people who passed no exam.

Let $B$ be the people who passed only Math.

Let $C$ be the people who passed only English.

Let $D$ be the people who passed both.

We know $A+B+C+D=40$

We know $A+C=10$

We know $C+D=30$

We know $A=6$.

So this is just a system of equations.

• I think I got it now. – user440404 Oct 31 '17 at 16:54

I find a Venn Diagram to always be very helpful for these kinds of questions:

$A,B,C,D$ are the regions according to Jorge's answer

So we know the following:

Once you figure out how the '10 people did not pass Math' plays out in the diagram, the rest goes quick.

• I was trying to plug it into venn. – user440404 Oct 31 '17 at 16:57
• does the venn diagram help? You get a lot of clumping in this case. – Yorch Oct 31 '17 at 16:59
• @JorgeFernández True ... but I think different approaches work better for different people. So maybe for some the diagram is more distracting than helpful, but for others it may be helpful. Personally, I'm a very visual person. And once you figure out how the '10 people not inside the Passed Math' circle plays out in the diagram, the rest goes quick. – Bram28 Oct 31 '17 at 17:08

I hope my cute Venn diagram can be useful to somebody :) $$...$$


Complex function sketch

I have just started studying some complex functions and I do not understand the concept very well (I cannot visualize them easily). So I would appreciate some help for the following problem:

Say we have the complex function f(z) = cosh(z) . I would like to know how the f-plane looks like when x=const. and respectively y=const.

Thank you very much!

-
When you can visualize complex functions easily, let me know. I still have a hard time, too :) –  Clayton Sep 13 '13 at 20:29
Ok, I see that the "easily" is rather stupid but what I wanted to say is that the transition from real to complex functions is not very smooth in my head.:) –  Whats My Name Sep 13 '13 at 20:45

You may be interested in this paper regarding visualizing complex functions:

"Phase Plots of Complex Functions: A Journey in Illustration" by Elias Wegert and Gunter Semmler.

Jim Fowler and I (Steve Gubkin) wrote this webpage to help visualization of complex functions:

We hope to produce an online complex analysis course soon which employs a diverse set of visualization methods. For example, we will use webGL to produce 3d plots of modulus colored by phase, phase plots on the riemann sphere, interactive geometry tools for the poincare metric on the disk, etc. We should also have a lot of computational exercises which are verified directly by a server running an instance of sage. We are still developing back end stuff right now, but we should have something up and running within the year. We do not have anything up there now, but watch this space: http://www.gratisu.org/.

Peace, Steve

-
This is very helpful. Thank you very much! –  Whats My Name Sep 13 '13 at 23:36
I'm interested by such a course. I already illustrated a whole course of mathematics for bachelor using complex functions on my website: www.mikaelmayer.com/reflex/category/cours-a-lepfl/ Students appreciated it. –  Mikaël Mayer May 5 at 13:25
@MikaëlMayer Ya, I still have plans to do this, but we got sort of distracted by producing calculus content (also, I defend my thesis tomorrow). I cannot promise when, but I definitely intend to build this course! –  Steven Gubkin May 5 at 18:31

Let $z=x+iy.$ Separating the real and imaginary parts of $f,$ we have \begin{align} f(z)=f(x+iy)=\cosh(z)=\dfrac{e^{x+iy}+e^{-x-iy}}{2}\\ =\dfrac{1}{2}[e^x(\cos{y}+i\sin{y} )+e^{-x}(\cos{y}-i\sin{y})] \\=\cos{y}\cdot\dfrac{e^x+e^{-x}}{2}+i\sin{y}\cdot\dfrac{e^x-e^{-x}}{2}. \end{align} Denote $$u(x+iy)=\Re{f(x+iy)}=\cos{y}\cdot\dfrac{e^x+e^{-x}}{2}=\cosh{x}\cdot\cos{y},\\ v(x+iy)=\Im{f(c+iy)}=\sin{y}\cdot\dfrac{e^x-e^{-x}}{2}=\sinh{x}\cdot\sin{y}$$ For fixed $x=c$

$$\dfrac{u(c+iy)}{\cosh{c}}=\cos{y},\\ \dfrac{v(c+iy)}{\sinh{c}}=\sin{y}.$$ Squaring last equalities, we have ellipse $$\dfrac{u^2}{\cosh^2{c}}+\dfrac{v^2}{\sinh^2{c}}=1.$$

-

Although you asked this question a while ago, I have a new answer. You may be interested by the website reflex4you.com in "expert" mode. For example, the $cosh$ function is the following:

$z\rightarrow cosh(z)$ (click on the picture to visit the website and enter other formulas)

Although the axis are not shown, the window is between $-4-3i$ and $4+3i$. The zero is black and white is infinite. 1 is red and -1 is cyan. This representation is quasi-invariant if you take the negative of the picture, it will represent the inverse function.

To analyze this picture, you can consider that the values on the horizontal axis (the real axis) are red and darkest a zero, which means that $cosh(x) > cosh(0)$. The black spot are zeroes of the function corresponding to $+/- \pi/2$; Colored points denote complex functions. $i$ is greenish whereas $-i$ is purplish.

By clicking on the image above, you can modify the formula and try out other ones. I feel it is a very good way to represent complex functions.

To answer your original question, I wrote an algorithm usable on the website to compute the f-plane, for example for x constant. You can modify the value of the parameter c (constant for $x$). @M.Strochyk was right, these are ellipses.

let c = 1; set k = 0; let min = -4; let max = 4; let n = 100; func f = cosh(z); set result = 0; let threshold = 0.1; repeat n in set theta = ((max-min)*k/n+min)*i+c; set result = if(abs(f(theta)-z) < threshold, theta, result); set k = k + 1; result

Click on the picture to be able to modify it by entering different values.

DISCLAIMER: I am one of the co-authors of this website.

-


Step-by-Step Solution for $x^{1/x}=2^{1/2}$ [duplicate]

I came across the equation $$x^{1/x}=2^{1/2}$$ where $x\in\mathbb R$. One can immediately see that $x=2$ is a solution, but it is easy to miss that $x=4$ satisfies the equation as well. Verfiying that $2,4$ are solutions is not hard, but how would one go about formally solving this equation, i.e. how could one solve for $x$? I am asking because if the equation was say $x^{1/x}=2^{1/3}$ then the two solutions would not be obvious.

Basically, how to fill in the dots: $$x^{1/x}=2^{1/2} \iff \ldots\iff x=2 \text{ or } x=4$$

• for $0 < A < \frac{1}{e}$ there are two solutions to $\frac{\log x}{x} = A.$ For $A > \frac{1}{e}$ there are no solutions. Just draw the graph of $y = \frac{\log x}{x}$ for $x > 0.$ – Will Jagy Jan 17 '15 at 23:32
• @WillJagy Thank you for this, but I am more interested in how to obtain the solutions, not so much in how to prove their existence. – Phil-ZXX Jan 17 '15 at 23:46
• Tom, you asked about the well known example, $2^4 = 4^2.$ Someone came up with a reasonable conjecture on all rational solutions to $x^y = y^x.$ Having trouble finding that. I mean he asked his conjecture as an MSE question. – Will Jagy Jan 18 '15 at 1:26
• a moderator found it for me, see answer at meta.math.stackexchange.com/questions/19299/… – Will Jagy Jan 18 '15 at 2:39

Notice

$$x ^{1/x} = 2^{1/2} \Rightarrow x = 2^{x/2} \Rightarrow x^{2} = 2^x$$

then you may look want take a look here.

• There are two good answers there. Feel free to ask anything. – Aaron Maroja Jan 17 '15 at 23:32
• Thank you. The accepted answer in your link does not actually provide any insights in how to obtain the solutions, whereas your solutions looks very nice (this was exactly what I was looking for). But I am still wondering, is there any way around the Lambert W function? – Phil-ZXX Jan 18 '15 at 0:08
• @Tom Yes, see my answer. And no, you won't get explicit results except for the special cases like $2^4=4^2$. – user2345215 Jan 18 '15 at 0:08
• @user2345215 I do agree with the reasoning of your answer, but it doesn't tell me how to obtain 2,4 (asssuming I did not know them). If the equation was $x^{1/x}=2^{1/3}$ we would have to actually derive the solutions, and I am looking for a way to do this (not a way to prove that 2,4 are the only solutions). – Phil-ZXX Jan 18 '15 at 0:12
• @Tom I'm glad I could help you Tom, well there is Newton's approximation. – Aaron Maroja Jan 18 '15 at 0:23

Note that $$(x^{1/x})'=(e^{(\ln x)/x})'=\tfrac{1-\ln x}{x^2}x^{1/x}$$ So the function is increasing on $(0,e)$ and decreasing on $(e,\infty)$. Therefore $2$ and $4$ are the only solutions.

From this follows that $x^{1/x}=c$ has two solutions for $c\in (1,e^{1/e})$, one for $c\in(0,1]\cup\{e^{1/e}\}$ and no for $c\in(e^{1/e},\infty)$.

I suppose it is necessary to consider what happens when $x < 0.$ There is a question of interpretation of $x^{\frac{1}{x}}$ for $x \leq 0,$ ( for example, $(-1)^{r}$ could reasonable interpreted as a non-real complex number if $r$ is an irrational positive real number, if we consider $-1$ to be $e^{i \pi}$), so I assume the function only to be defined for $x >0$, where it is defined to be $e^{\frac{\log x}{x}}.$ As far as this question is concerned, it seems that the case $x >0$ is the most relevant case anyway.

Note that $x >0$ is a solution of $x^{\frac{1}{x}} = 2^{\frac{1}{2}}$ if and only if $\frac{\log x}{x} = \frac{\log 2}{2}.$ The derivative of $\frac{\log x}{x}$ is $\frac{ 1 - \log x}{x^{2}}$ which is positive when $x <e$ and negative when $x > e.$ Hence $\frac{\log x}{x}$ increases when $x <e$, then decreases when $x >e$, taking a maximum value when $x = e.$ The values of $\frac{ \log x}{x}$ are positive on $(1, \infty)$ and the function is differentiable on that interval.Now if $\frac{log{x}}{x} = \frac{\log{y}}{y}$ for $1 < x < y,$ then the derivative vanishes somewhere on $(x,y)$ by the Mean Value Theorem. Since the derivative vanishes only at $e$, we see that any value of $\frac{\log x}{x}$ can be attained at most twice. Since $\frac{\log{4}}{4} = \frac{2\log 2}{2 \times 2} = \frac{\log 2}{2},$ we see that $2$ and $4$ are the only values of $x$ for which $x^{\frac{1}{x}} = 2^{\frac{1}{2}}.$


# Good Question 13

Let’s end the year with this problem that I came across a while ago in a review book:

Integrate $\int{x\sqrt{x+1}dx}$

It was a multiple-choice question and had four choices for the answer. The author intended it to be done with a u-substitution but being a bit rusty I tried integration by parts. I got the correct answer, but it was not among the choices. So I thought it would make a good challenge to work on over the holidays.

1. Find the antiderivative using a u-substitution.
2. Find the antiderivative using integration by parts.
3. Find the antiderivative using a different u-substitution.
4. Find the antiderivative by adding zero in a convenient form.

Your answers for 1, 3, and 4 should be the same, but look different from your answer to 2. The difference is NOT due to the constant of integration which is the same for all four answers. Show that the two forms are the same by

2. “Simplifying” your answer to 1, 3, 4 and get that third form again.

Give it a try before reading on. The solutions are below the picture.

Method 1: u-substitution

Integrate $\int{x\sqrt{x+1}dx}$

$u=x+1,x=u-1,dx=du$

$\int{x\sqrt{x+1}dx=}\int{\left( u-1 \right)\sqrt{u}}du=\int{{{u}^{3/2}}-{{u}^{1/2}}}du=\tfrac{5}{2}{{u}^{5/2}}-\tfrac{3}{2}{{u}^{3/2}}$

$\tfrac{2}{5}{{\left( x+1 \right)}^{5/2}}-\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}+C$

Method 2: By Parts

Integrate $\int{x\sqrt{x+1}dx}$

$u=x,du=dx$

$dv=\sqrt{x+1}dx,v=\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}$

$\int{x\sqrt{x+1}dx}=\tfrac{2}{3}x{{\left( x+1 \right)}^{3/2}}-\int{\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}dx}=$

$\tfrac{2}{3}x{{\left( x+1 \right)}^{3/2}}-\tfrac{4}{15}{{\left( x+1 \right)}^{5/2}}+C$

Method 3: A different u-substitution

Integrate $\int{x\sqrt{x+1}dx}$

$u=\sqrt{x+1},x={{u}^{2}}-1,$

$du=\tfrac{1}{2}{{\left( x+1 \right)}^{-1/2}}dx,dx=2udu$

$2{{\int{\left( {{u}^{2}}-1 \right){{u}^{2}}}}^{{}}}du=2\int{{{u}^{4}}-{{u}^{2}}}du=\tfrac{2}{5}{{u}^{5}}-\tfrac{2}{3}{{u}^{3}}=$

$\tfrac{2}{5}{{\left( x+1 \right)}^{5/2}}-\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}+C$

This gives the same answer as Method 1.

Method 4: Add zero in a convenient form.

Integrate $\int{x\sqrt{x+1}dx}$

$\int{x\sqrt{x+1}}dx=\int{x\sqrt{x+1}+\sqrt{x+1}-\sqrt{x+1} dx=}$

$\int{\left( x+1 \right)\sqrt{x+1}-\sqrt{x+1}}dx=$

$\int{{{\left( x+1 \right)}^{3/2}}-{{\left( x+1 \right)}^{1/2}}dx}=$

$\tfrac{2}{5}{{\left( x+1 \right)}^{5/2}}-\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}+C$

This, also, gives the same answer as Methods 1 and 3.

So, by a vote of three to one Method 2 must be wrong. Yes, no, maybe?

No, all four answers are the same. Often when you get two forms for the same antiderivative, the problem is with the constant of integration. That is not the case here. We can show that the answers are the same by factoring out a common factor of ${{\left( x+1 \right)}^{3/2}}$. (Factoring the term with the lowest fractional exponent often is the key to simplifying expressions of this kind.)

Simplify the answer for Method 2:

$\tfrac{2}{3}x{{\left( x+1 \right)}^{3/2}}-\tfrac{4}{15}{{\left( x+1 \right)}^{5/2}}+C=$

$\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}\left( x-\tfrac{2}{5}\left( x+1 \right) \right)+C=$

$\displaystyle \tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}\left( \frac{5x-2x-2}{5} \right)+C=$

$\tfrac{2}{15}{{\left( x+1 \right)}^{3/2}}\left( 3x-2 \right)+C$

Simplify the answer for Methods 1, 3, and 4:

$\tfrac{2}{5}{{\left( x+1 \right)}^{5/2}}-\tfrac{2}{3}{{\left( x+1 \right)}^{3/2}}+C=$

$\tfrac{2}{15}{{\left( x+1 \right)}^{3/2}}\left( 3\left( x+1 \right)-5 \right)+C=$

$\tfrac{2}{15}{{\left( x+1 \right)}^{3/2}}\left( 3x-2 \right)+C$

So, same answer and same constant.

Is this a good question? No and yes.

As a multiple-choice question, no, this is not a good question. It is reasonable that a student may use the method of integration by parts. His or her answer is not among the choices, but they have done nothing wrong. Obviously, you cannot include both answers, since then there will be two correct choices. Moral: writing a multiple-choice question is not as simple as it seems.

From another point of view, yes, this is a good question, but not for multiple-choice. You can use it in your class to widen your students’ perspective. Give the class a hint on where to start. Even better, ask the class to suggest methods; if necessary, suggest methods until you have all four (… maybe there is even a fifth). Assign one-quarter of your class to do the problem by each method. Then have them compare their results. Finally, have them do the simplification to show that the answers are the same.

My next post will be after the holidays.

.

# Starting Integration

Behind every definite integral is a Riemann sums. Students need to know about Riemann sums so that they can understand definite integrals (a shorthand notation for the limit if a Riemann sun) and the Fundamental theorem of Calculus. Theses posts help prepare students for Riemann sums.

1. The Old Pump Where I start Integration
2. Flying into Integrationland Continues the investigation in the Old Pump – the airplane problem
3. Working Towards Riemann Sums
4. Definition of the Definite Integral and the FTC – a more exact demonstration from last Friday’s post and The Fundamental Theorem of Calculus –  an older demonstration
5. More about the FTC The derivative of a function defined by an integral – the other half of the FTC.
6. Good Question 11 Riemann Reversed – How to find the integral, given the Riemann sum
7. Properties of Integrals
8. Variation on a Theme – 2 Comparing Riemann sums
9. Trapezoids – Ancient and Modern – some history

# The Definite Integral and the FTC

The Definition of the Definite Integral.

The definition of the definite integrals is: If f is a function continuous on the closed interval [a, b], and $a={{x}_{0}}<{{x}_{1}}<{{x}_{2}}<\cdots <{{x}_{{n-1}}}<{{x}_{n}}=b$  is a partition of that interval, and $x_{i}^{*}\in [{{x}_{{i-1}}},{{x}_{i}}]$, then

$\displaystyle \underset{{\left| {\left| {\Delta x} \right|} \right|\to 0}}{\mathop{{\lim }}}\,\sum\limits_{{i=0}}^{n}{{f\left( {x_{i}^{*}} \right)}}\left( {{{x}_{i}}-{{x}_{{i-i}}}} \right)=\int\limits_{a}^{b}{{f\left( x \right)dx}}$

The left side of the definition is, of course, any Riemann sum for the function f on the interval [a, b]. In addition to being shorter, the right side also tells you about the interval on which the definite integral is computed. The expression $\left\| {\Delta x} \right\|$  is called the “norm of the partition” and is the longest subinterval in the partition. Usually, all the subintervals are the same length, $\frac{{b-a}}{n}$, and this is the last your will hear of the norm. With all the subdivisions of the same length this can be written as

$\displaystyle \underset{{n\to \infty }}{\mathop{{\lim }}}\,\sum\limits_{{i=0}}^{n}{{f\left( {x_{i}^{*}} \right)}}\frac{{b-a}}{n}=\int\limits_{a}^{b}{{f\left( x \right)dx}}$

Other than that, there is not much more to the definition. It is simply a quicker and more efficient notation for the sum.

The Fundamental Theorem of Calculus (FTC).

First recall the Mean Value Theorem (MVT) which says: If a function is continuous on the closed interval [a, b] and differentiable on the open interval (a, b) then there exist a number, c, in the open interval (a, b) such that ${f}'\left( c \right)\left( {b-a} \right)=f\left( b \right)-f\left( a \right)$.

Next, let’s rewrite the definition above with a few changes. The reason for this will become clear.

$\int\limits_{a}^{b}{{{f}'\left( x \right)dx}}=\underset{{\left| {\left| {\Delta x} \right|} \right|\to 0}}{\mathop{{\lim }}}\,\sum\limits_{{i=0}}^{n}{{{f}'\left( {{{c}_{i}}} \right)\left( {{{x}_{i}}-{{x}_{{i-i}}}} \right)}}$

Since every function is the derivative of another function (even though we may not know that function or be able to write a closed-form expression for it), I’ve expressed the function as a derivative, I’ve also chosen the point in each subinterval, ${{c}_{i}}$, to be the number in each subinterval guaranteed by the MVT for that subinterval.

Then, $\displaystyle {f}'\left( {{{c}_{i}}} \right)\left( {{{x}_{i}}-{{x}_{{i-i}}}} \right)=f\left( {{{x}_{i}}} \right)-f\left( {{{x}_{{i-1}}}} \right)$. Making this substitution, we have

$\int\limits_{a}^{b}{{{f}'\left( x \right)dx}}=\underset{{\left| {\left| {\Delta x} \right|} \right|\to 0}}{\mathop{{\lim }}}\,\sum\limits_{{i=0}}^{n}{{\left( {f\left( {{{x}_{i}}} \right)-f\left( {{{x}_{{i-1}}}} \right)} \right)}}$

$\displaystyle =f\left( {{{x}_{1}}} \right)-f\left( {{{x}_{0}}} \right)+f\left( {{{x}_{2}}} \right)-f\left( {{{x}_{1}}} \right)+f\left( {{{x}_{3}}} \right)-f\left( {{{x}_{2}}} \right)+\cdots +f\left( {{{x}_{n}}} \right)-f\left( {{{x}_{{n-1}}}} \right)$

$\displaystyle =f\left( {{{n}_{n}}} \right)-f\left( {{{x}_{0}}} \right)$

And since ${{x}_{0}}=a$ and  ${{x}_{n}}=b$,

$\displaystyle \int_{a}^{b}{{{f}'\left( x \right)dx}}=f\left( b \right)-f\left( a \right)$

This equation is called the Fundamental Theorem of Calculus. In words, it says that the integral of a function can be found by evaluating the function of which the integrand is the derivative at the endpoints of the interval and subtracting the values. This is a number that may be positive, negative, or zero depending on the function and the interval. The function of which the integrand is the derivative, is called the antiderivative of the integrand.

The real meaning and use of the FTC is twofold:

1. It says that the integral of a rate of change (i.e. a derivative) is the net amount of change. Thus, when you want to find the amount of change – and you will want to do this with every application of the derivative – integrate the rate of change.
2. It also gives us an easy way to evaluate a Riemann sum without going to all the trouble that is necessary with a Riemann sum; simply evaluate the antiderivative at the endpoints and subtract.

At this point I suggest two quick questions to emphasize the second point:

1. Find $\int_{3}^{7}{{2xdx}}$.

Ask if anyone knows a function whose derivative is 2x? Your students will know this one. The answer is x2, so

$\displaystyle \int_{3}^{7}{{2xdx}}={{7}^{2}}-{{3}^{2}}=40$.

Much easier than setting up and evaluating a Riemann sum!

2. Then ask your students to find the area enclosed by the coordinate axes and the graph of cos(x) from zero to $\frac{\pi }{2}$. With a little help they should arrive at

$\displaystyle \int_{0}^{{\pi /2}}{{\cos \left( x \right)dx}}$.

Then ask if anyone knows a function whose derivative is cos(x). it’s sin(x), so

$\displaystyle \int_{0}^{{\pi /2}}{{\cos \left( x \right)dx}}=\sin \left( {\frac{\pi }{2}} \right)-\sin \left( 0 \right)=1-0=1$.

At this point they should be convinced that the FTC is a good thing to know.

There is another form of the FTC that is discussed in More About the FTC.

# Good Question 12 – Parts with a Constant?

Someone asked me about this a while ago and I thought I would share it with you. It may be a good question to get your students thinking about; see if they can give a definitive answer that will, of course, include a justification.

Integration by Parts is summarized in the equation

$\displaystyle \int_{{}}^{{}}{udv}=uv-\int_{{}}^{{}}{vdu}$

To use the equation, you choose part of a given integral (left side) to be u and part to be dv, both functions of x. Then you differentiate u and integrate dv and use them on the right side to obtain a simpler integral that you can integrate.

The question is this: When you integrate dv, should you, can you, have a constant of integration, the “+ ” that you insist upon in other integration problems? Why don’t you use it here? Or can you?

Answer: Let’s see what happens if we use a constant. Assume that $\displaystyle \int_{{}}^{{}}{dv}=v+C$. Then

$\displaystyle \int_{{}}^{{}}{udv}=u\cdot \left( v+C \right)-\int_{{}}^{{}}{\left( v+C \right)du}$

$\displaystyle =uv+Cu-\left( \int_{{}}^{{}}{vdu}+\int_{{}}^{{}}{Cdu} \right)$

$\displaystyle =uv+Cu-\int_{{}}^{{}}{vdu}-Cu$

$\displaystyle =uv-\int_{{}}^{{}}{vdu}$

So, you may use a constant if you want, but it will always add out of the expression.

For more on integration by parts see here for the basic idea, here for the tabular method, here for a quicker way than the tabular method, and here for more on the tabular method and reduction formulas.

# Good Question 11 – Riemann Reversed

Good Question 11 – or not.

The question below appears in the 2016 Course and Exam Description (CED) for AP Calculus (CED, p. 54), and has caused some questions since it is not something included in most textbooks and has not appeared on recent exams. The question gives a Riemann sum and asks for the definite integral that is its limit. Another example appears in the 2016 “Practice Exam” available at your audit website; see question AB 30. This type of question asks the student to relate a definite integral to the limit of its Riemann sum. These are called reversal questions since you must work in reverse of the usual order. Since this type of question appears in both the CED examples and the practice exam, the chances of it appearing on future exams look good.

To the best of my recollection the last time a question of this type appeared on the AP Calculus exams was in 1997, when only about 7% of the students taking the exam got it correct. Considering that by random guessing about 20% should have gotten it correct, this was a difficult question. This question, the “radical 50” question, is at the end of this post.

Example 1

Which of the following integral expressions is equal to $\displaystyle \underset{n\to \infty }{\mathop{\lim }}\,\sum\limits_{k=1}^{n}{\left( \sqrt{1+\frac{3k}{n}}\cdot \frac{1}{n} \right)}$ ?

There were 4 answer choices that we will consider in a minute.

The first key to answering the question is to recognize the limit as a Riemann sum. In general, a right-side Riemann sum for the function f on the interval [a, b] with n equal subdivisions, has the form:

$\displaystyle \underset{n\to \infty }{\mathop{\lim }}\,\sum\limits_{k=1}^{n}{\left( f\left( a+\frac{b-a}{n}\cdot k \right)\cdot \frac{b-a}{n} \right)}=\int_{a}^{b}{f\left( x \right)dx}$

To evaluate the limit and express it as an integral, we must identify, a, b, and f. I usually begin by looking for $\displaystyle \frac{b-a}{n}$. Here $\displaystyle \frac{b-a}{n}=\frac{1}{n}$ and from this conclude that ba = 1, so b = a + 1.

Usually, you can start by considering a = 0 , which means that the $\displaystyle \frac{b-a}{n}\cdot k$ becomes the “x.”. Then rewriting the radicand as $\displaystyle 1+3\frac{1}{n}k=1+3\left( a+\frac{1}{n}\cdot k \right)$, it appears the function is $\sqrt{1+3x}$ and the limit is $\displaystyle \int_{0}^{1}{\sqrt{1+3x}}dx=\frac{14}{9}$.

(A)  $\displaystyle \int_{0}^{1}{\sqrt{1+3x}}dx$        (B)    $\displaystyle \int_{0}^{3}{\sqrt{1+x}}dx$      (C)    $\displaystyle \int_{1}^{4}{\sqrt{x}}dx$     (D)   $\displaystyle \tfrac{1}{3}\int_{0}^{3}{\sqrt{x}}dx$

The correct choice is (A), but notice that choices B, C, and D can be eliminated as soon as we determine that b = a + 1. That is not always the case.

Let’s consider another example:

Example 2: $\displaystyle \underset{n\to \infty }{\mathop{\lim }}\,\sum\limits_{k=1}^{n}{\left( {{\left( 2+\frac{3}{n}k \right)}^{2}}\left( \frac{3}{n} \right) \right)}=$

As before consider $\displaystyle \frac{b-a}{n}=\frac{3}{n}$, which implies that b = a + 3. With a = 0,  the function appears to be ${{\left( 2+x \right)}^{2}}$ on the interval [0, 3], so the limit is $\displaystyle \int_{0}^{3}{{{\left( 2+x \right)}^{2}}}dx=39$

BUT

What if we take a = 2? If so, the limit is $\displaystyle \int_{2}^{5}{{{x}^{2}}dx}=39$.

And now one of the “problems” with this kind of question appears: the answer written as a definite integral is not unique!

Not only are there two answers, but there are many more possible answers. These two answers are horizontal translations of each other, and many other translations are possible, such as $\displaystyle \int_{-25.65}^{-22.65}{{{\left( 27.65+x \right)}^{2}}dx}=39$.

The same thing can occur in other ways. Returning to example 1,and using something like a u-substitution, we can rewrite the original limit as $\displaystyle \frac{1}{3}\cdot \underset{n\to \infty }{\mathop{\lim }}\,\sum\limits_{k=1}^{n}{\left( \sqrt{1+\frac{3k}{n}}\cdot \frac{3}{n} \right)}$.

Now b = a + 3 and the limit could be either $\displaystyle \frac{1}{3}\int_{0}^{3}{\sqrt{1+x}}dx=\frac{14}{9}$ or $\displaystyle \frac{1}{3}\int_{1}^{4}{\sqrt{x}}dx=\frac{14}{9}$, among others.

The real problem with the answer choices to Example 1 is that they force the student to do the question in a way that gets one of the answers. It is perfectly reasonable for the student to approach the problem a different way, and get a different correct answer that is not among the choices. This is not good.

The problem could be fixed by giving the answer choices as numbers. These are the numerical values of the 4 choices:(A) 14/9   (B) 14/3   (C)  14/3   (D)    $2\sqrt{3}/3$. As you can see that presents another problem. Distractors (wrong answers) are made by making predictable calculus mistakes. Apparently, two predictable mistakes give the same numerical answer; therefore, one of them must go.

A related problem is this: The limit of a Riemann sum is a number; a definite integral is a number. Therefore, any definite integral, even one totally unrelated to the Riemann sum, which has the correct numerical value, is a correct answer.

I’m not sure if this type of question has any practical or real-world use. Certainly, setting up a Riemann sum is important and necessary to solve a variety of problems. After all, behind every definite integral there is a Riemann sum. But starting with a Riemann sum and finding the function and interval does not seem to me to be of practical use.

The CED references this question to MPAC 1: Reasoning with definitions and theorems, and to MPAC 5: Building notational fluency. They are appropriate,and the questions do make students unpack the notation.

My opinions notwithstanding, it appears that future exams will include questions like these.

These questions are easy enough to make up. You will probably have your students write Riemann sums with a small value of n when you are teaching Riemann sums leading up to the Fundamental Theorem of Calculus.  You can make up problems like these by stopping after you get to the limit, giving your students just the limit, and having them work backwards to identify the function(s) and interval(s). You could also give them an integral and ask for the associated Riemann sum. Question writers call questions like these reversal questions since the work is done in reverse of the usual way.

Here is the question from 1997, for you to try. The answer is below.

Answer B. Hint n = 50

Revised 5-5-2022

# Parts and More Parts

At an APSI this summer the participants and I got to discussing the “tabular method” for integration by parts. Since we were getting far from what is tested on the BC Calculus exams, I ended the discussion and said for those that were interested I would post more on the tabular method this blog going farther than just the basic set up. So here goes.

Here are some previous posts on integration by parts and the tabular method

Integration by Parts 1 discusses the basics of the method. This is as far as a BC course needs to go.

Integration by Parts 2 introduces the tabular method

Modified Tabular Integration presents a very quick and slick way of doing the tabular method without making a table. This is worth knowing.

There is also a video on integration by parts here. Scroll down to “Antiderivatives 5: A BC topic – Integration by parts.” The tabular method is discussed starting about time 15:16. There are several ways of setting up the table; one is shown here and a slightly different way is in the Integration by Parts 2 post above. There are others.

### Going further with the tabular method.

The tabular method works well if one of the factors in the original integrand is a polynomial; eventually its derivative will be zero and you are done. These are shown in the examples in the posts above and Example 1 below. To complete the topic, this post will show two other things that can happen when using integration by parts and the tabular method.

First we look at an example with a polynomial factor and learn how to stop midway through. Why stop? Because often there will be no end if you don’t stop. There are ways to complete the integration as shown in the examples.

Example 1:  Find $\displaystyle \int_{{}}^{{}}{\left( 4{{x}^{3}} \right)\cos \left( x \right)dx}$ by the tabular method (See Integration by Parts 2 for more detail on how to set the table up)

Adding the last column gives the antiderivative:

$\displaystyle \int_{{}}^{{}}{\left( 4{{x}^{3}} \right)\cos \left( x \right)dx}=4{{x}^{3}}\sin \left( x \right)+12{{x}^{2}}\cos \left( x \right)-24x\sin \left( x \right)-24\sin \left( x \right)+C$

Now say you wanted to stop after $12{{x}^{2}}\cos \left( x \right)$. Example 2 shows why you want (need) to stop. In Example 1 you will have

$\displaystyle \int_{{}}^{{}}{\left( 4{{x}^{3}} \right)\cos \left( x \right)dx}=4{{x}^{3}}\sin \left( x \right)+12{{x}^{2}}\sin \left( x \right)+\int_{{}}^{{}}{-24x\cos \left( x \right)}dx$

The integrand on the right is the product of the last column in the row at which you stopped and the first two columns in the next row, as shown in yellow above.

Example 2 Find $\displaystyle \int_{{}}^{{}}{{{e}^{x}}\cos \left( x \right)dx}$

As you can see things are just repeating the lines above sometimes with minus signs. However, if we stop on the third line we can write:

$\displaystyle \int_{{}}^{{}}{{{e}^{x}}\cos \left( x \right)dx={{e}^{x}}\sin \left( x \right)}+{{e}^{x}}\cos \left( x \right)-\int_{{}}^{{}}{{{e}^{x}}\cos \left( x \right)dx}$

The integral at the end is identical to the original integral.  We can continue by adding the integral to both sides:

$\displaystyle 2\int_{{}}^{{}}{{{e}^{x}}\cos \left( x \right)dx={{e}^{x}}\sin \left( x \right)}+{{e}^{x}}\cos \left( x \right)$

Finally, we divide by 2 and have the antiderivative we were trying to find:

$\displaystyle \int_{{}}^{{}}{{{e}^{x}}\cos \left( x \right)dx=\tfrac{1}{2}{{e}^{x}}\sin \left( x \right)}+\tfrac{1}{2}{{e}^{x}}\cos \left( x \right)+C$

In working this type of problem you must be aware of that the original integrand showing up again can happen and what to do if it does. As long as the coefficient is not +1, we can proceed as above. The same thing happens if we do not use the tabular method. (If the coefficient is +1 then the other terms on the right will add to zero and you need to make different choices for u and dv.)

### Reduction Formulas.

Another use of integration by parts is to produce formulas for integrals involving powers. An integral whose integrand is of less degree than the original, but of the same form results. The formula is then iterated to continually reduce the degree until the final integral can be integrated easily.

Example 3: Find $\displaystyle \int_{{}}^{{}}{{{x}^{n}}{{e}^{x}}dx}$

Let $u={{x}^{n}},\ du=n{{x}^{n-1}}dx,\ dv={{e}^{x}}dx,\ v={{e}^{x}}$

$\displaystyle \int_{{}}^{{}}{{{x}^{n}}{{e}^{x}}dx}={{x}^{n}}{{e}^{x}}-n\int_{{}}^{{}}{{{x}^{n-1}}{{e}^{x}}dx}$

This is a reduction formula; the second integral is the same as the first, but of lower degree. Here is how it is used.  At each step the integrand is the same as the original, but one degree lower. So the formula can be applied again, three more times in this example.

Most textbooks have a short selection of reduction formulas.

### Final Thoughts.

Back in the “old days”, BC (before calculators), beginning calculus courses spent a lot of time on the topic of “Techniques of Integration.” This included integration by parts, algebraic techniques, techniques known as trig-substitutions, and others. Mathematicians and engineers had tables of integrals listing over a thousand forms and students were taught how to use the tables and distinguish between similar forms in the tables. (See the photo below from the fourteenth edition of the CRC tables (c) 1965.) Current textbooks often contain such sections still.

Today, none of this is necessary. CAS calculators can find the antiderivatives of almost any integral. Websites such as WolframAlpha are also available to do this work.

I’m not sure why the College Board recently expanded slightly the list of types of antiderivatives tested on the exams. Certainly a few of the basic types should be included in a course, but what students really need to know is how to write the integral appropriate to a problem, and what definite and indefinite integrals mean. This, in my opinion, is far more important than being able to crank out antiderivatives of increasingly complicated expressions: let technology do that – or buy yourself an integral table. Just saying … .

# Trapezoids – Ancient and Modern

The other day, in the course of about 10 minutes, I came across two interesting things about Trapezoidal approximations that I thought I would share with you.

Cuneiform writing

The first was a link to a story about how the ancient Babylonian astronomers sometime between 350 and 50 BCE used trapezoids to, in effect, find the area under a velocity-time graph tracking Jupiter’s motion. This was an NPR story based on a January 2016 Science magazine article in which the author, Mathieu Ossendrijver discusses his work deciphering cuneiform tablets written over 1,400 years before the technique showed up in Europe.

The second was a question asked on the AP Calculus bulletin board. A teacher asked, “Can someone please help me answer this question a student posed the other day. We were comparing left, right and midpoint and trapezoidal approximations. He asked since the trapezoidal calculation is the best estimate what is the use of LRAM and RRAM?” Here is an expanded form of my answer.

There are several things to consider here.

1. First, if all you need is an estimate of the area or integral of a continuous function then a Trapezoid sum is certainly better than the left Riemann sum (left-RΣ) or the right-RΣ. Better, yes, the “best” maybe not: midpoint sums are about as good and parabola sums (Simpson’s Rule) are better.

2. Another reason to do left RΣ and right RΣ with small values of n is simply to give students practice in setting up Riemann sums so that they will be familiar with them when they move on to finding their limits and getting ready to define definite integrals.

3. A RΣ for a function f on a closed interval [a, b] is formed by partitioning the interval into subintervals and taking exactly one function value from each closed subinterval, multiplying the value by the width of that subinterval and adding these results. You may pick the function value any way you want – left end, middle, right end, any place at random in the subintervals and someplace else in the next subinterval. One way is to pick the smallest function value in each subinterval; this gives a RΣ called the lower RΣ. Likewise, you could pick the largest value in each subinterval; this gives the upper RΣ. Now it is true that

lower RΣ ≤ (any/all other RΣs) ≤ upper RΣ

Then as you add more partition points (n approaches infinity, or Δx approaches 0, etc.) the lower sum increases and the upper sum decreases. The series of lower sums is increasing and bounded above (by the upper sum) and therefore converges to its least upper bound. The upper sum decreases forming a decreasing series that is bounded below and therefore converges to its greatest lower bound.

If the lower RΣ and the upper RΣ approach the same value, then ALL the other RΣs approach that same value by the Squeeze theorem. This value is then defined as the definite integral of f from a to b.

In most AP calculus course, the textbooks do not deal with upper and lower sums. Instead, they deal with left RΣ and right RΣ on intervals on which f is only increasing (or only decreasing). In this case the lower RΣ = left RΣ and the upper RΣ = the right RΣ (or the other way around for decreasing functions).

So, this is why you need the left RΣ and right RΣ; not so much to approximate, but to complete the theory leading to the definite integral.