- #1

Catria

- 152

- 4

## Homework Statement

Solve the inhomogenous partial differential equation [itex]\frac{∂^{2}u}{∂t^{2}}-\frac{∂^{2}u}{∂x^{2}}=-6u^{5}+(8+4ε)u^3-(2+4ε)u[/itex] by using the NDSolve function in Mathematica for the interval [0,10] x [-5,5].

## Homework Equations

Initial conditions:

u(0,x)= tanh(x)

u'(0,x)= 0

## The Attempt at a Solution

NDSolve[{D[u[t, x], t, t] - D[u[t, x], x, x] ==

6 u^5 + (8 + 4 a) u^3 - (2 + 4 a) u, u[t, x] /. t -> 0 == Tanh[x],

D[u[t, x], t] /. t -> 0 == 0, u}, u[t, x], {t, 0, 10}, {x, -5, 5}]

But when I enter this into Mathematica, I get the message NDSolve::deqn: "Equation or list of equations expected instead of u[0==Tanh[x],x] in the first argument...