I wish to solve the following second order partial differential equation
$$u_{tt}=c^2 u_{xx}$$
with the initial conditions
$$u(x,0)=e^x,\quad u_t(x,0)=\sin x$$
In Mathematica, I evaluated the following code:
DSolve[{D[p[x, t], {t, 2}] == c^2 *(D[p[x, t], {x, 2}]),
p[x, 0] == Exp[x], D[p[x, t], t] == Sin[x]},
p[x, t], {x, t}]
Mathematica responded with
DSolve::deqx: Supplied equations are not differential equations of the given functions.
I think the problem lies in the initial conditions. How can I fix this code?
Derivative[0, 1][p][x, 0] == Sin[x]instead ofD[p[x, t], t] == Sin[x]in your code. (Although this correction did not seem to be sufficient to give a solution.) – Silvia Jan 19 '13 at 22:45/.t->0in his approach, but it's not the main problem). I feel tempted to answer, but it looks a lot like a homework problem. As a hint: first solve without the initial conditions, leading to two functionsC[1]andC[2]. Then find those functions by imposing the initial conditions att = 0. This can be done by converting both conditions to a set of equations only involvingC'[i]atxand-x. – Jens Jan 19 '13 at 23:57DSolvecan't handle this.. – Silvia Jan 20 '13 at 00:31DSolve[eqn, y, {x1, x2, ...}]and notDSolve[{eqn1, eqn2 ...}, y, {x1, x2, ...}]with multiple equations as would be the use case here. – Jens Jan 20 '13 at 07:01