I want to solve the following problem in Mathematica:
I used the following Mathematica code. I am unsure whether this is the correct way of entering the assumptions for the initial and boundary conditions though (i.e. whether DSolve
takes these assumptions into account.
eq = D[u[x, t], t, t] - 4*D[u[x, t], x, x] == 0
ic = {Simplify[u[x, 0] == 4 Sin[x], Assumptions -> x > 0], Simplify[Derivative[0, 1][u][x, 0] == 0, Assumptions -> x > 0]}
bc = {Simplify[Derivative[1, 0][u][0, t] == 0, Assumptions -> t > 0]}
Simplify[DSolve[{eq, ic, bc}, u[x, t], {x, t}, Assumptions -> t > 0 && x > -t]]
C[1]
. After makingC[1]->1
, the solution satisfies the pde as well as the bc and ic's. $\endgroup$DSolve
takes these assumptions into account. $\endgroup$DSolve
command will restrict the solution to a particular domain. $\endgroup$