ps2sol - ACM 95/100c Problem Set 2 Solutions Lei Zhang Each...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ACM 95/100c Problem Set 2 Solutions Lei Zhang April 10, 2006 Each Problem is worth 10 points. Each part of a multi-part problem is weighted equally. Problem 1 (Collaboration allowed) Consider the solution of the 1-D heat equation φ t = a 2 φ xx < x < l with boundary conditions φ (0 ,t ) = φ ( l,t ) = 0 and initial conditions φ ( x, 0) = 1 Solve this problem using a series solution obtained from separation of variables. Choose various numerical values for a 2 , x , l and decide how many terms are required to represent the solution at (a) t = 0, (b) t = 1, Solution 1 By the result from class notes, a series solution of the heat equation which satisfies the boundary condition u (0 ,t ) = u ( l,t ) = 0 is u ( x,t ) = ∞ X n =1 u n sin( nπx/l )exp(- a 2 n 2 π 2 t/l 2 ) (1) to satisfy the initial condition u ( x, 0) = 1, we need 1 = ∞ X n =1 u n sin( nπx/l ) (2) by orthogonality, u n = 2 l Z l sin( nπx l ) dx (3) = 2(1- (- 1) n ) nπ (4) i.e u ( x,t ) = ∞ X n =1 2(1- (- 1) n ) nπ sin( nπx/l )exp(- a 2 n 2 π 2 t/l 2 ) (5) 1 take a = 1, l = 1, choose the first 10 terms of series solution, we have the following results at t = 0 and t = 1 in Figure (1). Note that exact solution is red, and truncated series solution is blue, 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 Solution at t = 0 Distance x u(x,0) exact solution series solution (a) t = 0 . 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 x 10-5 Solution at t = 1 Distance x u(x,1) exact solution series solution (b) t = 1 . Figure 1: a = 1, l = 1, 10 terms. choose the first 100 terms, we have the following results at t = 0 and t = 1 in Figure (2), we can clearly see that at t = 0 the series converges nonuniformly, i.e. Gibbs phenomena. However, at t = 1, the series converges uniformly, from Figure (3) we can see even 2 terms is already a very good approximation. 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 Solution at t = 0 Distance x u(x,0) exact solution series solution (a) t = 0 . 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 x 10-5 Solution at t = 1 Distance x u(x,1) exact solution series solution (b) t = 1 . Figure 2: a = 1, l = 1, 100 terms. 2 now take a = 1, and different l = 1 and l = 5, we just choose first 2 terms. Compare the result at t = 1 in Figure (3), we find that with smaller l , the series converges faster. 1 2 3 4 5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Solution at t = 1 Distance x u(x,1) exact solution series solution (a) l = 5 . 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 x 10-5 Solution at t = 1 Distance x u(x,1) exact solution series solution (b) l = 1 . Figure 3: t = 1, a = 1, 2 terms. take different a = 0 . 1 and a = 1, with l = 1, we also choose first 2 terms. Compare the result at t = 1 in Figure (4), we find that with bigger a , the series converge faster....
View Full Document

This note was uploaded on 01/08/2011 for the course ACM 95c taught by Professor Nilesa.pierce during the Spring '09 term at Caltech.

Page1 / 18

ps2sol - ACM 95/100c Problem Set 2 Solutions Lei Zhang Each...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online