Message Boards Message Boards

[?] Obtain a symbolic solution of a PDE?

Posted 5 years ago

Resolve the following PDE:

pde = {D[u[x, t], {x, 2}] == D[u[x, t], t]};
inc = {u[-L, t] == u[L, t], Derivative[1, 0][u][-L, t] == Derivative[1, 0][u][L, t], u[x, 0] == Sin[x]};
DSolve[Join[pde, inc], u[x, t], {x, t}, Assumptions -> L > 0]

I have already seen in a textbook a symbolic solution to this PDE. I got the numerical solution with NDSolve. Is there any way to find the symbolic solution with DSolve?

POSTED BY: Sinval Santos
2 Replies

Sinval,

You should use the code formatting tool (the first button) so your code posts correctly.

Your equation is the heat equation. The problem is with your boundary conditions -- I believe that you specified no information with your first and second initial conditions because the solution is symmetric in x. So for example, This works:

heqn = D[u[x, t], t] == D[u[x, t], {x, 2}];
bc = {u[0, t] == 20, u[L, t] == 50};
ic = u[x, 0] == Sin[x];
sol = DSolve[{heqn, bc, ic}, u[x, t], {x, t}, Assumptions -> L > 0]

But this will not: (I changed the boundary condition to -L and made them equal)

heqn = D[u[x, t], t] == D[u[x, t], {x, 2}];
bc = {u[-L, t] == 20, u[L, t] == 20};
ic = u[x, 0] == Sin[x];
sol = DSolve[{heqn, bc, ic}, u[x, t], {x, t}, Assumptions -> L > 0]

You can also use a derivative boundary condition for example:

heqn = D[u[x, t], t] == D[u[x, t], {x, 2}];
bc = {u[L, t] == 20, Derivative[1, 0][u][0, t] == 0};
ic = u[x, 0] == Sin[x];
sol = DSolve[{heqn, bc, ic}, u[x, t], {x, t}, Assumptions -> L > 0]

There is more information about this PDE in the help for DSolve (search for "Model the flow of heat in a bar of length 1 using the heat equation:").

Regards,

Neil

POSTED BY: Neil Singer
Posted 5 years ago

Thanks Neil for the response and attention.

POSTED BY: Sinval Santos
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract