# Numerical solution of non-linear wave equation

I need to solve the following nonlinear wave equation numerically

$$u_{tt} - (c^2+ u^2)u_{xx} =0$$ with initial conditions : $u(x,0) = 1$ if $|x|<L$ and $0$ otherwise, $u_t(x,0) = 0$.

What is the best method for solving it? I want to solve it using finite difference with matlab

Any help will be appreciated!

• This is a partial differential equation not an Ordinary DE. Also it is second order as it has double derivatives. – user121049 Nov 21 '17 at 9:09
• You'll need to be more specific than that. What program/language are you using? What methods have you learned? What are the initial conditions? Boundary conditions? Wave speed $c$? Also, this question is very similar to the one posted here, even up to the language used in both posts. – Mattos Nov 21 '17 at 15:54
• Do you have any ideas as for how you want to numerically solve it? You need to give us some of your thoughts on the problem. Finite difference? Finite Element? There is just too little that is written in this post. – DaveNine Nov 21 '17 at 19:50
• I want to solve this equation using finite difference with Matlab – etet112 Nov 25 '17 at 20:36