Question: Solving the Wave Equation Use the method of lines and scipy . integrate . odeint to solve the wave equation uttznmr, 31:31-11, titan with initial

 Solving the Wave Equation Use the method of lines and scipy

Solving the Wave Equation Use the method of lines and scipy . integrate . odeint to solve the wave equation uttznmr, 31:31-11, titan with initial conditions u[U,.r] = sin[s.r}, nt[,:r) = I], D g a." i: 1, and boundary conditions u{t,] = I], u[t,1] = a, t 3:- I]. Integrate from t = l] to t = 2 for some reasonable value of r. Plot the computed solution as a threedimensional surface over the (t, 1:] plane. Note that the solution is periodic with period 2, so the solution should he the same at t = [l and t = 2. You should note whether this is true for your computed solution, though you do not need to output anything from this check. Determine the maximum absolute error in the computed solution by comparing with the exact solution n[t, r] : cosfxt) sinrr}. Compute this error for solutions resulting from $1: = 10.211, * k for k = , . . . , 5. On a loglog scale, plot the maximum error as a function of r. Try to characterize the error as a function of rst. Store the errors in the array errors ordered by increasing values of k. a Plot the solution to the PDE with the given initial and boundary conditions for some reasonable value of ns. a Plot the maximum error as described above. Be sure to use a loglog scale. a As always, use appropriate titles, labels, etc. a Store errors as described above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!