Can I solve a system of P.D.E's in mathematica symbolically?

1. Apr 15, 2010

andresordonez

SOLVED
I tried (with DSolve) but it just returned the input code, so I guess it can't. I also looked for it in the documentation center with no luck. Is there another way?

By the way, I'm using mathematica 7

Last edited: Apr 15, 2010
2. Apr 15, 2010

phyzguy

Mathematica will solve some PDEs with DSolve, if it can. Often you can help it along if you can simplify things. What is the system you are trying to solve?

3. Apr 15, 2010

andresordonez

I have a transformation in the phase space from (q1,q2,p1,p2) to (Q1,Q2,P1,P2) and I'm looking for the generating function to demonstrate that the transformation is canonical.
I guess the rest there is to say about it is in the equations.

This is my code:
Code (Text):

sol = Solve[{
q1 == 1/\[Alpha] (Sqrt[2 P1] Sin[Q1] + P2),
q2 == 1/\[Alpha] (Sqrt[2 P1] Cos[Q1] + Q2),
p1 == \[Alpha]/2 (Sqrt[2 P1] Cos[Q1] - Q2),
p2 == -(\[Alpha]/2) (Sqrt[2 P1] Sin[Q1] - P2)}, {p1, p2, P1, P2}] // Simplify

DSolve[{
p1 == D[F[q1, q2, Q1, Q2], q1],
p2 == D[F[q1, q2, Q1, Q2], q2],
P1 == -D[F[q1, q2, Q1, Q2], Q1],
P2 == -D[F[q1, q2, Q1, Q2], Q2]} /. sol[[1]],
F[q1, q2, Q1, Q2], {q1, q2, Q1, Q2}]

PS:
I know it would be simpler to use the symplectic condition, but it is part of a homework and I need to do it both ways. I also know it's simple to do it by hand (in this case) but it can become a tedious procedure really fast as the number of degrees of freedom increases.

4. Apr 15, 2010

phyzguy

I've had some success on these types of problems on Mathematica by breaking them up into a series of ODEs. That works in this case. Here's the code:

sol = Solve[{q1 == 1/\[Alpha] (Sqrt[2 P1] Sin[Q1] + P2),
q2 == 1/\[Alpha] (Sqrt[2 P1] Cos[Q1] + Q2),
p1 == \[Alpha]/2 (Sqrt[2 P1] Cos[Q1] - Q2),
p2 == -(\[Alpha]/2) (Sqrt[2 P1] Sin[Q1] - P2)}, {p1, p2, P1,
P2}] // Simplify

DSolve[{p1 == D[F[q1, q2, Q1, Q2], q1]} /. sol[[1]],
F[q1, q2, Q1, Q2], {q1, q2, Q1, Q2}]

DSolve[{p2 ==
D[1/2 q1 (-2 Q2 \[Alpha] + q2 \[Alpha]^2) + C[1][q2, Q1, Q2],
q2]} /. sol[[1]], C[1][q2, Q1, Q2], {q2, Q1, Q2}]

DSolve[{P1 == -D[
1/2 q1 (-2 Q2 \[Alpha] + q2 \[Alpha]^2) +
q2 Q2 \[Alpha] Tan[Q1] - 1/2 q2^2 \[Alpha]^2 Tan[Q1] +
C[2][Q1, Q2], Q1]} /. sol[[1]], C[2][Q1, Q2], {Q1, Q2}]

DSolve[{P2 == -D[
1/2 q1 (-2 Q2 \[Alpha] + q2 \[Alpha]^2) +
q2 Q2 \[Alpha] Tan[Q1] - 1/2 q2^2 \[Alpha]^2 Tan[Q1] -
1/2 Q2^2 Tan[Q1] + C[3][Q2], Q2]} /. sol[[1]], C[3][Q2], {Q2}]

FTrial = 1/2 q1 (-2 Q2 \[Alpha] + q2 \[Alpha]^2) +
q2 Q2 \[Alpha] Tan[Q1] - 1/2 q2^2 \[Alpha]^2 Tan[Q1] -
1/2 Q2^2 Tan[Q1] + C[4]

Test = {p1 == D[FTrial, q1], p2 == D[FTrial, q2],
P1 == -D[FTrial, Q1], P2 == -D[FTrial, Q2]} /. sol[[1]] //
Simplify

5. Apr 15, 2010

andresordonez

That should do it. Thank you phyzguy!