You are on page 1of 5

SOLUTION FOR MATH417 MIDTERM

Problem 1.(40 Points) Let f (x) = x for 0 x .


(1) Find the Fourier cosine series C[f ] of f (with [0, ] as the basic interval).
(2) Over the interval (3, 3), sketch the function to which the series converges.
(3) Find the Fourier sine series S[1] of 1 (0 x ).
(4) Find the Fourier sine series S[g] of g(x) = x x2 over [0, ].
(1). Since f (x) = x for 0 < x < ,
f (x) C[f ](x) = A0 +

An cos(nx).

n1

Then by definition, we have


A0

=
=
=
=

Z
1
f (x)dx
0
1
x2
(x )|0

2
1 2 2
(
)

.
2

For n 1, we have
An

=
=
=
=
=
=
=

f (x) cos(nx)dx
0

Z
2
x cos(nx)dx
0
Z
2
2

sin(nx)x|0 +
sin(nx)dx

n
0 n
2
0 + 2 ( cos(nx)|0
n
2
(1 cos(n))
n2
2
(1 (1)n )
2
n
 4
n odd
n2
0
n even

Now we see that


C[f ] =

+
2

X
n1, odd

4
cos(nx) .
n2

(2). Let f be the even and 2-periodic extension of f . By convergence theorem,


the Fourier cosine series C[f ] of f equals to f at the point of continuity, and
1

SOLUTION FOR MATH417 MIDTERM

f(x)+f(x+)
2

at the point of discontinuity. In this case, f is continuous on [0, ] and

so is the f . In conclusion, we know that for


C[f ](x) = f .
(3). Notice that we have f continuous and f 0 = 1 piecewise smooth, we can
have term by term differentiation for C[f ], and so
X
X
S[f 0 ] = (C[f ])0 =
An (cos(nx))0 =
nAn sin(nx)
n1,odd

n1,odd

Since f = 1,
S[1] = S[1] = S[f 0 ] =

nAn sin(nx) =

n1,odd

n1, odd

4
sin(nx) .
n

(4). We can use term by term integration on


X

4
f C[f ] = +
cos(nx) ,
2
n2
n1, odd

which gives us that


Z x
Z x
X
x
x2
=
f (x)dx =
C[f ]dx =
+
x
2
2
0
0

n1, odd

This tells us that

x x2
=
2
x x2 =

X
n1, odd

X
n1, odd

4
n2

cos(nx)dx =
0

X
x
+
2

n1, odd

4
sin(nx)
n3
8
sin(nx)
n3

Problem 2. (30 Points) Solve the boundary value problem for the Laplace
equation
2u 2u
(0 < x, y < )
x2 + y2 = 0
u(x, 0) = u(0, y) = u(, y) = 0

u(x, ) = x x2
You may stop when you can say And now continue as in Problem 1 (4), above.
(assume appropriate continuity)
Solution. By the method of separation of variables, we try to find all nontrivial
solutions of the form
u(x, t) = (x)h(y).
Then by the equation, we know that
d2 h
d2
(y)
+
(x)h(y) = 0,
dt2
dx2
and hence by dividing h, we can separate the variables (and get two equations for
and h),
d2 h
d2
(y)/h(y)
=

(x)/(x) = .
dy 2
dx2
Based on the BCs, we can also get the following conditions on and h,
(x)

h(0) = (0) = () = 0 .

4
sin(nx)
n3

SOLUTION FOR MATH417 MIDTERM

We study first the eigenvalue problem for . Recall that we must have
(0) = () = 0
from the boundary condition if we consider the nontrivial solution. The solution
for this eigenvalue problem is that
n = n2 ,

n (x) = sin(nx),

n 1.

For any n , the problem for h(y) is


h00 = n h = n2 h, h(0) = 0
We know the general solutions of the ODE can be
h(y) = C1 cosh(ny) + C2 sinh(ny) .
From the condition h(0) = 0, we have C1 = 0 and wlog, we can set C2 = 1. Thus
h(y) = sinh(ny) .
Then by the superposition principle, we guess the general solution to this problem
is given by
X
u(x, y) =
Bn sinh(ny) sin(nx) .
n1

(By continuity and BC, we conclude that we have identity for the solution u =
S[u(y)](x).)
To solve this problem, we need to check the remained BC u(x, ) = g(x), thus
by setting y = , we are reduced to determine the coefficients Bn of the Fourier
sine series of g(x) = x x2 . And now continue as in Problem 1, above, i.e.,
X
X
8
u(x, ) =
Bn sinh(n) sin(nx) =
sin(nx)
n3
n1

n1, odd

u(x, y) =

X
n1,odd

8 sinh(ny)
sin(nx) .
n3 sinh(n)

Problem 3. (30 Points) Solve the initial-boundary value problem for the linear
heat equation (assume appropriate continuity, try to simply the formula of the
solution)

2u
u
t x2 = x + 4 sin 2x (0 < x < , t > 0),
u(0, t) = 0, u(, t) = t (t > 0),

u(x, 0) = 0
(0 < x < ).
We use the method of eigenfunction expansion to solve the problem.
First method (combine the method of shifting the data) We have inhomogeneous BC, we first construct one reference function r(x, t) s.t.
r(0, t) = 0, r(, t) = t
we choose r(x, t) = tx.
Let v(x, t) = u(x, t) r(x, t), the the problem satisfied by v is

2v
u
2u
r
2r
v
t x2 = t x2 ( t x2 ) = x + 4 sin 2x x = 4 sin 2x (0 < x < , t > 0),
v(0, t) = 0, v(, t) = 0
(t > 0),

v(x, 0) = 0
(0 < x < ).

SOLUTION FOR MATH417 MIDTERM

Now we use the method of eigenfunction expansion. Recall the BC is of first


type and the corresponding eigenfunctions are
n = n2 , n (x) = sin nx
If v solves the problem, we have for some Bn (t) (we have identity due to the
continuity)
X
v(x, t) =
Bn (t) sin nx
n1

We use the term by term differentiation and the BC to conclude that


X
vt (x, t) =
Bn0 (t) sin(nx),
n1

vx (x, t) =

nBn (t) cos(nx),

n1

Applying term by term differentiation for the cosine series, we have


X
vxx (x, t) =
n2 Bn (t) sin(nx).
n1

Then the PDE tells us that


X
(Bn0 (t) + n2 Bn (t)) sin nx = 4 sin 2x
n1

that is
B10 + B1 = 0, B20 + 4B2 = 4, Bn0 + n2 Bn = 0, n 3
Moreover, IC tells us that
Bn (0) = 0, n 1 .
Solving the ODEs for Bn , we know that
B1 (t) = 0, B2 (t) = 1 e4t , Bn (t) = 0, n 3
And so
v(x, t) = (1 e4t ) sin 2x .
Recall the definition of v, we have
u(x, t) = v + r = tx + (1 e4t ) sin 2x.
Second method (direct use of method of eigenfunction expansion)
First, note that if we consider the case that the boundary condition is homogeneous, then the eigenfunction for the eigenvalue problem
xx + 2 = 0,

(0) = () = 0,

will be given by
n = n2 ,

n (x) = sin(nx),

n = 1, 2, .

Then we assume that the solution u take the form


X
u(x, t)
Bn (t) sin(nx), 0 < x < , t > 0.
n0

We use the term by term differentiation to conclude that


X
ut (x, t)
Bn0 (t) sin(nx),
n0

SOLUTION FOR MATH417 MIDTERM

Since the BC is not homogeneous, we need to use the generalized term by term
differentiation, to conclude
X
X2
1
ux (x, t) =
nBn (t) cos(nx) + u|0 +
u(y, t) cos(ny)|0 cos(nx),

n1
n1
X
(2t cos n + nBn (t)) cos(nx).
= t+
n1

Applying term by term differentiation for the cosine series,


X
uxx
n(2t cos n + nBn (t)) sin(nx) .
n1

Then if u is the solution to the PDE, we must have


Bn0 (t) + 2n(1)n t + n2 Bn (t) = Cn ,

n 1,

where Cn are Fourier coefficients of S[x + 4 sin 2x].


 2
n+1
n 6= 2
n (1)
Cn =
2
n+1
(1)
+
4
=
4

1
=
3
n=2
n
Bn0 (t) + n2 Bn (t) = 2n(1)n+1 t + Cn = Dn (t)
To solve these ODEs, we need also to consider the initial conditions, the initial
conditions for the coefficients are
Bn (0) = 0,

n 1.

Then the solution for the ODEs for the coefficients are
Z t
2
2
2
Bn (t) = en t
Dn (r)en r dr = t (1)n+1 + (1 e4t )2n
n
0
In conclusion, the solution is
X
u(x, t) =
Bn (t) sin(nx)
n1

for 0 < x < and t > 0.

You might also like