Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. For values of $x in[-1,2]$, and $t in[0,1]$, write a Matlab/Octave code surname-initial s1.m to solve the one way wave equation $u_{t}+a u_{x}=0$ with
1. For values of $x \in[-1,2]$, and $t \in[0,1]$, write a Matlab/Octave code surname-initial s1.m to solve the one way wave equation $u_{t}+a u_{x}=0$ with initial data, $u(x, 0)=\exp \left(-10[x-0.1]^{2} ight) $ and exact solution $$ u(x, t)=e^{-10(x-a t-0.1)^{2}}, $$ boundary conditions $u(-1, t)=u(2, t)=0$, using the Lax-Wendroff scheme $$ \frac{1}{k}\left(v_{m}^{n+1}-v_{m}^{n} ight]+a \frac{1}{2 h}\left(v_{m+1}^{n} -v_{m-1}^{n} ight]-\frac{a^{2} k}{2} \frac{1} {h^{2}}\left(v_{m+1}^{n}-2 v_{m}^{n} +v_{n-1}^{n} ight ]=0 $$ You may assume that the scheme is convergent provided $\left|a \frac{k} {h} ight|=la \lambda| \leq 1$. Use the wave speed, $a=1.1$ and answer the following questions. CS.VS.960
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started