Answers to review problems for the third exam
in Math 421, spring 2004

Most (but not all) of the problems are written so that computations of integrals are not needed! Again, thanks to Professor N. Komarova for many of these problems and for contributing to some of the answers.

 means no answer is available yet. But now they're all here!

#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16 #17


1. If f(x)=3cos(5x)-9sin(2x)+8sin(33x), compute -PiPi(f(x))2 dx.

Answer
Remember that the functions cos(5x) and sin(2x) and sin(33x) are all orthogonal on the interval [-Pi,Pi] for the "dot product" coming from the formula -PiPi(function1)(function2) dx. Also, the square of a sine or cosine on the interval has integral pi. Therefore the value of -PiPi(f(x))2 dx is (pi)[32+92+82].


2. Use the complex form of sine and the formula for the sum of a geometric series to find a simple real formula for SUMn=1infinity[sin(nx)]/2n.

Answer
I know that sin(w) is [eiw-e-iw]/[2i]. Let me concentrate temporarily on eiw. If I plug in nx for w and divide by 2n and sum from 1 to infinity I will get SUMn=1infinity[ei nx]/[2n]. But ei nx is also (eix)n so that what is inside the sum is [eix/2]n. Therefore the sum is a geometric series with first term eix/2 and ratio between successive terms eix/2.

The sum of a geometric series is a/(1-r) if a is the first term and r is the ration between successive terms. So here the sum would be [eix/2}/[1-eix/2] and this is eix/[2-eix]. The sum of the other terms, with e-ix, turns out to be e-ix/[2-e-ix].

We need 1/(2i) multiplied by the difference (the complex formula of sine has a minus in it!) of eix/[2-eix] and e-ix/[2-e-ix]. This difference is a fraction, which should be combined in the standard way for fractions.
The top of the fraction is eix(2-e-ix)- e-ix(2-eix)= 2eix-1 -2e-ix+1= 2eix-2e-ix.
The bottom of the fraction is [(2-e-ix)(2-e-ix)]=4-2eix-2e-ix+1 =5-2eix-2e-ix.

I "recognize" the bottom as 5-4cos(x) since cos(x) is (1/2)[eix+e-ix].
The top (put in the division by 2i) is [2eix-2e-ix]/2i which is 2sin(x).

Therefore the whole sum is the function [2sin(x)]/[5-4cos(x)]. We did this only with the geometric series formula and some complex arithmetic.
Further information, including a graph, can be found
here.


3. Suppose f(x) is the function with the graph shown. (The graph is two line segments connecting the three indicated points.)

a) Find the Fourier coefficients of f(x).

b) Suppose g(x) is the sum of the first 100 terms of the Fourier series of f(x) (both sine and cosine). Draw a graph of both y=g(x) and y=f(x) on the interval [0,3]. Draw a graph of both y=g(x) and y=f(x) on the interval (3,Pi). Label the graphs.

c) Suppose now h(x) is the sum of the whole Fourier series of f(x). Graph f(x) and h(x) on the interval [-Pi,Pi]. Label the graphs.

Answer
a) Here we go. f(x) is 0 for x<0 and is (1/Pi)x otherwise. The integrals only matter on [0,Pi].

The Fourier sine coefficients are (1/Pi)-PiPif(x)sin(nx) dx=(1/Pi)0Pi(1/Pi)x sin(nx) dx=(1/Pi20Pix sin(nx) dx.
We integrate x sin(nx) by parts with u=x and dv=sin(nx)dx. I won't go through the details. The result is -(x/n) cos(nx)+(1/n2)sin(nx). We need then to |0Pi. The result of that is -(Pi/n)cos(nPi) because sin(nPi) is 0. And cos(nPi) is (-1)n, so that (putting it all together) the nth Fourier sine coefficient, bn, is (1/Pi n)(-1)n+1.

For n=0, we know that a0 is just the total area, which is Pi/2. The other Fourier cosine coefficients are (1/Pi20Pix cos(nx) dx. The result of this integration turns out to be [(-1)n-1]/(Pi2n2).

b) Here are the graphs of f(x) and g(x). I checked with Maple. f(x) and g(x) are virtually indentical on this scale on [0,3]. On [3,Pi) we see the Gibbs overshoot phenomenon, and the fact that g(x) tries to be periodic, and "exits" the interval on the right at the halfway point between 1 and 0.

On [0,3]On [3,Pi)

c) The whole Fourier series is equal to the original function except that the Fourier series attempts to compromise at -Pi and Pi, and there it inserts a value halfway between 0 and 1.


4. Calculate the Fourier series of the functions given (all defined on the interval [-Pi,Pi]):

a) f(x)=-1 if x=<0 and 2 if x>0.

b) f(x)=5.

c) f(x)=21+2sin(5x)+8cos(2x).

d) f(x)=SUMn=18cnsin(nx); cn=1/n.

e) f(x)=-4+SUMn=16(cnsin(nx)+7cos(nx)) ; cn=(-1)n.

Answer
Part a) is the only part which needs any computation. That's because the f(x)'s in b), c), d) and e) are already Fourier series: they are their own answers. (All the other Fourier coefficients are 0 because of orthogonality!) I still need to do a), though.

Answer to a): if n>0, an=(1/Pi)-PiPif(x)cos(nx) dx. We'll compute the integral by splitting it into two parts because of the piecewise definition of f(x):
-Pi0(-1)cos(nx) dx=[(-1)/n](sin(n·0)-sin(-n·Pi)]=0.
0Pi2cos(nx) dx=[2/n](sin(n·Pi)-sin(n·0)]=0.
So an=0 when n>0 because sine at integer multiples of Pi is 0.

Now a0 is (1/Pi)(the integral of f(x) from -Pi to Pi), which is 1. Why are all the other an's equal to 0? There is a simple reason. We can write f(x)=(1/2)+(another function)? The "another function" here is -3/2 on [-Pi,0) and 3/2 on (0,Pi]. So "another function" is odd and its cosine Fourier coefficients are all 0. Therefore f(x)'s cosine Fourier coefficients, except for the constant (n=0) one, are all 0.

The sine coefficients:
Here n>0. bn=(1/Pi)-PiPif(x)sin(nx) dx. Again, the integral is more easily computed by splitting it into two parts because of the piecewise definition of f(x):
-Pi0(-1)sin(nx) dx=-[(-1)/n](cos(n·0)-cos(-n·Pi)].
0Pi2sin(nx) dx=-[2/n](cos(n·Pi)-cos(n·0)]=0.

The total integral is (3/n)[1-cos(n·Pi)] because the antiderivative of sine is -cosine, and because cos(0)=1 and cos(-w)=cos(w). Now cos(n·Pi)=(-1)n, so that bn=(3/n)[1+(-1)n+1].

The Fourier series of f(x) is therefore (1/2)+SUMn=1infinity(3/n)[1+(-1)n+1]sin(nx).


5. a) Suppose f(x)=x+x3 for x in [-Pi,Pi]. Which coefficients of the Fourier series of f(x) must be 0?

b) Suppose f(x)=cos(x5)+sin(x2) for x in [-Pi,Pi]. Which coefficients of the Fourier series of f(x) must be 0?

Answer
a) f(x) is an odd function. Indeed, f(-x)=-x+(-x)3=-x-x3=-(x+x3)=-f(x). Therefore all the an's must be 0 (the cosine coefficients).

b) g(x) is an even function. Indeed, g(-x)=cos((-x)5)+sin((-x)2)=cos(-x5)+sin(x2)=cos(x5)+sin(x2)=g(x). Therefore all the nn's must be 0 (the sine coefficients).


6. Suppose f(x)=x+x4 for x in [0,Pi].

a) If F(x) is the odd extension of f(x) to [-Pi,Pi], write a formula or formulas for F(x). Which terms must be 0 in the Fourier series of F(x)?

b) If G(x) is the even extension of f(x) to [-Pi,Pi], write a formula or formulas for G(x). Which terms must be 0 in the Fourier series of G(x)?

Answer
a) F(x) is x+x4 for x>0, and F(x) is x-x4 for x<0. Then we know that F(-x)=-F(x) so F(x) is odd. For an odd function, the cosine coefficients are 0: what we generally call the an's.

b) G(x) is x+x4 for x>0, and G(x) is -x+x4 for x<0. Then we know that G(-x)=G(x) so G(x) is even. For an even function, the sine coefficients are 0: what we generally call the bn's.


7. Suppose f(x)=2e-4x for x in [0,Pi]. Another function, F(x), is given by F(x)=SUMn=0infinity bnsin(nx), where bn=(2/Pi)0Pi2e-4xsin(nx) dx. Compute F(3) and F(-2) in terms of values of the exponential function.

Answer
The function F(x) is the Fourier sine expansion of f(x). On the domain of f, that is, for x in [0,Pi], we have F(x)=f(x). Therefore, since 3 is in [0,Pi], then F(3)=f(3)=2e-12.

For the negative values of x, the sine series converges to the odd extension of f(x). That is, F(x)=-f(-x) for x<0. Therefore F(x)=-2e^{4x} for x<0 so that F(-2)=-2e-8.

Question from the Management
What if the cosine series had been given instead? What would the answers be? Click
here for an answer.


8. Both ends of a string of length 25 cm are attached to fixed points at height 0. Initially, the string is at rest, and has the shape 4sin([2Pi x]/25}), where x is the horizontal coordinate along the string, with 0 at the left end. The speed of wave propagation along the string is 3 cm/sec. Write the initial and boundary value problem for the shape of the string.

Answer
ytt=9yxx for x [0,25]; y(0,t)=y(25,t)=0; y(x,0)=4sin([2Pix]/25); yt(x,0)=0.


9. Suppose the following boundary value problem is given:
ytt=yxx for x in [0,Pi]; y(0,t)=y(Pi,t)=0; y(x,0)=5sin(2x)+8sin(6x); yt(x,0)=0.

Find y(x,t).

Answer
Here is an answer:
y(x,t)=5sin(2x)cos(2t)+8sin(6x)cos(6t)
I got this by recalling the separation of variables pairings we used when we solved the wave equation.


10. Suppose the following boundary value problem is given:
ytt=50yxx for x in [0,100]; y(0,t)=y(100,t)=0; y(x,0)=x2(100-x); yt(x,0)=x for x in [0,25] and (1/3)(100-x) for x in (25,100].

What is the speed of wave propagation along the string? What is the initial displacement of the string at the point x=20? What is the initial velocity of the string at the point x=50? At what point of the string is the initial velocity the largest?

Answer
The speed of wave propagation along the string is sqrt{50}. The initial displacement of the string at the point x=20 is 202(100-20)=32,000. The initial velocity of the string at the point x=50 is (1/3)(100-50)=50/3. The maximum of the initial velocity is at the point x=25. The easiest way to see this is to plot yt(x,0), or we could use calculus: in [0,25] the function is increasing and in [25,100] it is decreasing and the function is continuous.


11. Suppose the following boundary value problem is given:
ytt=50yxx for x in [0,Pi]; y(0,t)=y(Pi,t)=0; y(x,0)=0; yt=g(x).

Suppose we also know 0Pig(x)sin(nx) dx=1/n3 for all positive integers, n. Find y(x,t).

Answer
Here we are considering the wave equation with initial displacement equal to 0. Then the solution is y(x,t)=SUMn=1infinitycnsin{nx)sin(nt) with cn=2/[nPi]0Pig(x)sin(nx) dx=2/[n4Pi]


12. Use separation of variables to analyze the equation yt=12y-5yx+7yxx.
That is, reduce this partial differential equation to some ordinary differential equations. Explain every step.

Answer
Assume that y(x,t)=X(x)T(t). Then substitute this in the equation and get
X(x)T'(t)=12X(x)T(t)-5X'(x)T(t)+7X''(x)T(t).

Now divide both sides by X(x)T(t):
[T'(t)/T(t)]=12-5[X'(x}/X(x)]+7[X''(x)/X(x)].

The left hand side does not depend on x. The right had side does not depend on t. They are equal to each other. Therefore, both the left hand side and the right hand side are constants. We set the constant to be -, and obtain two ordinary differential equations:
T'(t)=-T(t)
-5X'(x)+7X''(x)=-X(x)
and that's the desired pair of ODE's.


13. Consider this wave equation and initial value problem on the whole real line, R:

ytt=9yxx for x in R; y(x,0)=x(2-x) for x in [0,2] and y=0 otherwise; yt(x,0)=0 for x in R.

a) Find y(x,t).

b) Draw the solution for t=5 and t=10 (two graphs).

c) How long will it take before an observer located at point x=27 receives a signal?

Answer
a) The D'Alembert form of the solution is: y(x,t)=(1/2)(f(x-3t)+f(x+3t)) where f(x) is the initial displacement profile. The first part is a wave traveling right and the second part is a wave traveling left. Since the initial velocity is 0, we don't need the "g" terms.

But what is f(x)? It is actually not the simple algebraic x(2-x), but (since we're going to substitute x-/+3t in for x) a function which is equal to x(2-x) in [0,2] but is 0 otherwise. Here is a way of writing this, using the Heaviside function from Laplace transforms:
the initial profile is x(2-x)H(x)H(2-x).

Now I can write y(x,t). It is (1/2){[x-3t](2-[x-3t])H([x-3t])H(2-[x-3t])+[x+3t](2-[x+3t])H([x+3t])H(2-[x+3t])}.

b)

t=5t=10

The graphs are two bumps half the height of the original profile. One is traveling left and the other, right. The speed is 3 distance units per time unit. The original bump is centered at x=1. For t=5, the bumps are centered at -14 and 16. For t=10, they are centered at -29 and 31. I have drawn the horizontal and vertical axes with different units.

c) The right edge of the bump moving right will reach x=27 at time (27-2)/3=25/3.


14. The graph displays an initial (t=0) temperature distribution for u(x,t), the temperature on an insulated bar 4 cm long satisfying the heat equation ut=uxx and the boundary conditions u(0,t)=0 and u(4,t)=0 for all t.

a) Sketch a graph of u(x,1/100) and a graph of u(x,100).

b) Explain why this initial temperature distribution can't result from an earlier temperature distribution.

Answers
a)

t=.01t=100

b) The initial temperature distribution shown is not smooth: more precisely, it is not differentiable at x=2 and x=2.5 and x=3. Temperature distributions which are the result of the time "evolution" of earlier temperature distributions must be smooth. Therefore this initial temperature distribution is not the "evolution" of an earlier temperature distribution.


15. Suppose an insulated bar of length Pi cm also has insulated ends. An initial temperature distribution is given by f(x)=2 for x in [0,Pi/2] and 4 for x in (Pi/2,Pi].

a) Write the initial and boundary value problem for u(x,t), the temperature of the bar.

b) Write the solution, u(x,t).

c) What is the limiting temperature distribution as t-->infinity?

Answer
a) The boundary value problem is this: ut=kuxx for some constant k (the heat equation) and ux(0,t)=0 and ux(Pi,t)=0 for t>=0 (the boundary conditions, representing insulated ends) and u(0,x)=f(x) for x in [0,Pi] (the initial condition).

b) u(x,t)=[c0/2]+SUMc=1infinitycncos(nx)e-kn2t where:
If n>0, cn=(2/Pi)0Pif(x)cos(nx) dx= (2/Pi)0Pi/22cos(nx) dx+(2/Pi)Pi/2Pi4cos(nx) dx=[4/Pi]sin([nPi]/2). sin([nPi]/2) is 1 if n=4k+1 and is -1 is n=4k+3. Otherwise it is 0. We could invent some sort of "formula" but I think the value of cn is now clear.
For n=0, then c0=(2/Pi)0Pif(x) dx=6.

c) The limiting temperature distribution is the constant 3 (that's c0/2, or the average of the initial temperature, f(x).) All of the exponentials with negative constants force the other terms to 0 very rapidly.


16. Suppose an insulated bar of length 10 cm has insulated ends. Find the temperature distribution as t-->infinity if: a) The initial temperature distribution is given by f(x) where
f(x)=0 if x is in [0,1],
2 if x is in (1,2],
0 if x is in (2,3],
5 if x is in (3,4], and
2 if x is in (4,10].
Correction The problem statement as distributed had f(x)=2 if x is in (4,6]. Since the length of the bar is specified as 10, this leaves the the initial temperature distribution undefined from 6 to 10. The problem statement should have read as above.
b) The initial temperature distribution is given by f(x)=x+2x^2.

Answer
In a bar with insulated ends, we saw (using both a mathematical treatment and thinking about the physical situation) that the limiting temperature distribution as t-->infinity is the average value of the initial temperature distribution.
a) The average value is (0+2+0+5+2·6)/(10)=(19)/(10).
b) The average value is (1/10)010x+2x2 dx=(1/10)[(1/2)x2+(2/3)x3]|010=(215)/3. Remember that the (1/10) comes from the average value over the interval [0,10].


17. An insulated bar of length 5 cm has its left end kept at temperature 0 for all t, and its right end kept at temperature 5 for all t. The bar's initial temperature distribution is given by f(x)=6x-x2. If u(x,t) is the temperature distribution at time t for t>= 0, then draw the temperature distribution for t=0, t=1/100, and t=100 (three graphs).

Answer

t=0t=.01t=100
Comments
The first picture is a parabola, with vertex at (3,9) (hey: the derivative of 6x-x2 is 6-2x etc.). The next picture shows the initial heat distribution "relaxing" a bit towards equilibrium, and the next picture shows the steady state temperature distribution for these boundary conditions. u(x,100) would like very much like this, I believe. Check me with Maple or Matlab if you wish.


Answer to the Management's question in the answer to #7: 2e-12 again for F(3), but F(-2) would be 2e-8.