# Solving PDE IVP with inequalities in domains

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]]

• The line $x = 0$, $t>0$ (where your last boundary condition is specified) is in the interior of the region where the full ODE is specified ($t > 0, x>-t$.) So it's not really a "boundary" condition like we'd normally encounter. Can you confirm that this is correct and doesn't have some weird typo? Jun 2, 2020 at 21:41
• @Michael Seifert It's actually $x = -t$, not $x = 0$, but Mathematica can't solve such conditions, so I chose something else to ask the question (whose main point was to check whether this is the correct way of entering the assumptions). Jun 2, 2020 at 22:20
• Your code works fine for me although for some reason Mathematica includes an arbitrary constant C[1]. After making C[1]->1 , the solution satisfies the pde as well as the bc and ic's. Jun 2, 2020 at 22:50
• @Bill Watts It works for this example, but I'm not sure whether DSolve takes these assumptions into account. Jun 2, 2020 at 23:01
• I worked it without any of the assumptions and I got an answer that also satisfied all the conditions. But the solution with assumptions was shorter, so they did something. Simplifying with appropriate assumptions after the solution is found may do just as well. I doubt assumptions on the DSolve command will restrict the solution to a particular domain. Jun 2, 2020 at 23:11