# The output is the same as Input when I add the boundary conditions to a PDE

I am trying to solve a PDE in the first order with specific boundary conditions. When I solve use DSolve without the boundary conditions, Mathematica gives me an answer in an arbitrary function. When I put the boundary conditions, it doesn't solve it. Could someone please help me with this issue (word of caution: I am new to Mathematica). Thank you advance in time.

Code:

 pde = D[S[x, y, z], x] + D[S[x, y, z], y] + D[S[x, y, z], z] - A*S[x, y, z] - B == 0


Here A and B are known constants and S[x,y,z] is the solution I am looking for.

Then I simply use

DSolve[{pde, S[0,y,z] ==0, S[x,y,0] ==0, S[x,0,z] ==0}, S[x,y,z] , {x,y,z}]


This returns me the output equivalent to the input! Thank you.

You can simply plug the general solution into the boundary condition:

pde = D[S[x, y, z], x] + D[S[x, y, z], y] + D[S[x, y, z], z] - A*S[x, y, z] - B == 0
sol = DSolve[pde, S, {x, y, z}];
bc = {S[0, y, z] == 0, S[x, y, 0] == 0, S[x, 0, z] == 0};
bc /. sol

{{(-B + A C[y, z])/A == 0,
(-B + A E^(A x) C[-x + y, -x])/A == 0,
(-B + A E^(A x) C[-x, -x + z])/A == 0}}


Apparently, all 3 boundary conditions point to a trivial solution, by the way, in fact you only need one b.c. for there's only one constant in the general solution.

Here's a example for a b.c. leading to a non-trivial solution:

Clear[a, b]
bc2 = S[x, y, 0] == 1;
eqn = bc2 /. sol[];
rule = Solve[Cases[eqn, C[_][a__] -> a, Infinity] == {a, b}, {x, y}];
Solve[eqn /. rule, C[a, b]] /. C[a, b] -> C[a_, b_];
sol /. %

{{{S -> Function[{x, y, z}, (-B + (A E^(A x) ((A + B) E^(A (-x + z))))/A)/A]}}}

• Thank you. That makes sense now. – Soham Mar 9 '14 at 0:41