
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

AMath 301 Due Date: Early Friday morning, June 1st
āu āT
ā^2 u āx^2
where i =
ā1 and u = u(x, T ) is a function of both x and T. Assume periodic boundary conditions with L = 20 (x ā (ā 10 , 10)) and use N = 128 for the number of discrete points. For your time-stepping routine, use ode45 with Tspan = [0 : 1 : 20].
(a) Using the initial condition U (x) = sech(x), solve the PDE using a finite difference method. Using a waterfall plot, view the absolute value of the solution:
waterfall(x,T,abs(u)) This is what is called a soliton solution to NLS. As this solution propagates in T , it holds itās form!
ANSWERS: ode45 solution output should be saved as A1.dat (b) Using the initial condition U (x) = 2sech(x), solve the PDE using a finite differ- ence method. Using a waterfall plot, view the absolute value of the solution: The solution here is doing what is called a āsoliton danceā, where it returns to itās initial state after T = Ļ/2 units.
ANSWERS: ode45 solution output should be saved as A2.dat (c) Using the initial condition U (x) = sech(x), solve the PDE spectrally using FFTs. Using a waterfall plot, view the absolute value of the solution u. Compare with (a).
ANSWERS: ode45 solution output should be saved as A3.dat. (d) Using the initial condition U (x) = 2sech(x), solve the PDE spectrally using FFTs. Using a waterfall plot, view the absolute value of the solution u. Compare with (b).
ANSWERS: ode45 solution output should be saved as A4.dat.
Note: Each data file is worth 5 points.