Question: Numerical solution for nonlinear PDE equation

Hello

 I wish to solve nonlinear PDE equation numerically  in u & v coordinate . where u=t-x, v=t+x . we note x=(v-u)/2.. 

pde := diff(u(t,x),t,t) - diff(u(t,x),x,x) + x^2*u(t,x);  

 

 We need only initial condition let f(u)=sech(u) & g(v)=sech(v). So u((i,0)=f(ih), u(0,j)=g(jh) 

we summe step size of time j =  step size of spatial i .

the stencil we use , 

u(i,j)=-u(i-1,j-1)+(1-h^2/8*v(h/2*(j-i-1)))*u(i,j-1)+(1-h^2/8*v(h/2*(j-i+1)))*u(i-1,j);

 

Thank you 

Please Wait...