Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Edit: since the upgrade to Mathematica 10, this problem seems solved

I just want to solve a system of partial differential equations, for example:

$$ \left\{ \begin{array}{l} \frac{\partial}{\partial a}[f(a, b, c)] = 4 \sin^2(b) \cos(c) \\ \frac{1}{a} \times \frac{\partial}{\partial b}[f(a, b, c)] = 4 \cos(c) \sin(2b) \\ \frac{1}{a \sin(b)} \times \frac{\partial}{\partial c}[f(a, b, c)] = -4 \sin(b) \sin(c) \\ \end{array} \right. $$

And when I try to solve this system in Mathematica, the output does not help:

In[1]:= DSolve[
{
    D[f[a, b, c], a] == 4 Sin[b]^2 Cos[c],
    (1/a) *D[f[a, b, c], b] == 4 Cos[c] Sin[2 b],
    (1/(a Sin[b]))*D[f[a, b, c], c] == -4 Sin[b] Sin[c]
}, f[a, b, c], {a, b, c}]

Out[1]= DSolve[
{
    Derivative[1, 0, 0][f][a, b, c] == 4*Cos[c]*Sin[b]^2,
    Derivative[0, 1, 0][f][a, b, c]/a == 4*Cos[c]*Sin[2*b],
    (Csc[b]*Derivative[0, 0, 1][f][a, b, c])/a == -4*Sin[b]*Sin[c]
}, f[a, b, c], {a, b, c}]

Obviously, this output is useless… Probably I doing something wrong…

Thank you for your help

Note : The solution is $f(a, b, c) = 4a \sin^2(b) \cos(c) + K$ (K : the integration constant).

share|improve this question
    
When DSolve returns unevaluated, it means that it couldn't solve the problem. From the documentation: "DSolve can find general solutions for linear and weakly nonlinear partial differential equations. Truly nonlinear partial differential equations usually admit no general solutions." While yours looks solvable, it probably just decides it can't do it. –  Szabolcs Feb 14 at 21:46
    
That's strange. Because this system has at least one solution : f(a, b, c) = 4a Sin[b]^2 * Cos[c] + K (K : the integration constant). –  mlpo Feb 14 at 21:49
1  
Here is something more strange. Try DSolve[{D[f[a, b], a] == 0,(1/a) D[f[a, b], b] == 0},f[a, b], {a, b}] and it can't do it. Now remove the (1/a) from the second equation, (which is the same as multiplying both sides by a, then it solves it ! –  Nasser Feb 14 at 22:34
1  
@Nasser Looks like you touched on the solution. If we bring the OP's PDE system into a form where the LHS only has the derivatives, Mma can solve the system: DSolve[{D[f[a, b, c], a] == 4 Sin[b]^2 Cos[c], D[f[a, b, c], b] == 4 a Cos[c] Sin[2 b], D[f[a, b, c], c] == -4 a Sin[b] Sin[b] Sin[c]}, f[a, b, c], {a, b, c}] You should post this as an answer, it's worth highlighting. –  Szabolcs Feb 14 at 22:37
1  
@Szabolcs Yes, I was just trying to verify things...was planing to write something but have to make coffee first :) btw, Maple is able to solve it in its current form without rearranging: screen shot !Mathematica graphics –  Nasser Feb 14 at 22:39

1 Answer 1

up vote 15 down vote accepted

One can get a hint of the issue by seeing that

 DSolve[{1/a D[f[a, b], a] == 1, D[f[a, b], b] == 1}, f[a, b], {a, b}]

can't be solved, but

 DSolve[{ D[f[a, b], a] == a, D[f[a, b], b] == 1}, f[a, b], {a, b}]
 (* {f[a, b] -> a^2/2 + b + C[1]}} *)

can. But there are the same system! (multiplying by a both sides of the first equation in the first case gives the second system). The first system, as written, is consistent. There is a test one can use to check the system of PDE's is consistent. Using Maple:

with(PDEtools):

eq1 := 1/a*diff(f(a,b),a) = 1:
eq2 := diff(f(a,b),b)     = 1:

ConsistencyTest({eq1,eq2});
(* true *)
dsolve({eq1,eq2},f(a,b));
(* f(a, b) = (1/2)*a^2+b+_C1 *)

May be DSolve got worried about singularity when a=0? I do not know. But noticing the above gives a hint on the solution. Simply rearrange terms so that the leading derivative term has unity as factor.

DSolve[{
  D[f[a, b, c], a] == 4 Sin[b]^2 Cos[c],
  D[f[a, b, c], b] == a 4 Cos[c] Sin[2 b],
  D[f[a, b, c], c] == -a Sin[b] 4 Sin[b] Sin[c]},
 f[a, b, c], {a, b, c}
 ]

(* {{f[a, b, c] -> C[1] + 4 a Cos[c] Sin[b]^2}} *)

By the way, there really should not be a need to do this rearrangement. Maple 17 can solve this as is

Mathematica graphics

The real question is: Why is the rearrangement needed? that is what the inquiring minds want to know :)

share|improve this answer
    
isn't the answer do to with the fact that in the first form if a=0 or sin(b)=0 the equation is singular whereas it is not in the other form? For instance what happens if the boundary condition involve a=0 ? –  chris Apr 9 at 7:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.