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

In summary, this person is trying to solve a problem in which they have a transformation from (q1,q2,p1,p2) to (Q1,Q2,P1,P2) and they are looking for the generating function to demonstrate that the transformation is canonical. They have tried DSolve and it just returned the input code, so they are guessing it can't do it. They have also looked for the generating function in the documentation center with no luck. They have found success on similar problems by breaking them up into a series of ODEs. They have written code to solve the problem and it looks like it should work.
  • #1
andresordonez
68
0
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:
Physics news on Phys.org
  • #2
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
Thanks for the early reply!
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:
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
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
That should do it. Thank you phyzguy!
 

1. Can Mathematica solve any system of partial differential equations (P.D.E's) symbolically?

Yes, Mathematica has built-in capabilities for solving a wide range of P.D.E's symbolically, including systems of coupled equations.

2. How accurate are the solutions obtained from Mathematica for P.D.E systems?

The accuracy of the solutions depends on various factors such as the complexity of the equations, the numerical methods used, and the precision settings chosen in Mathematica. In general, the solutions obtained are highly accurate.

3. Can Mathematica handle systems of P.D.E's with boundary conditions?

Yes, Mathematica has functions for specifying boundary conditions for P.D.E systems, which allows for more accurate and specific solutions.

4. Are there any limitations to the size or complexity of P.D.E systems that Mathematica can solve?

While Mathematica is capable of solving large and complex P.D.E systems, there may be limitations in terms of computational resources and memory available on the user's machine. In such cases, it may be necessary to simplify the equations or use numerical methods instead.

5. Can Mathematica solve P.D.E systems in different coordinate systems?

Yes, Mathematica has the ability to solve P.D.E systems in various coordinate systems, including Cartesian, polar, and spherical coordinates. This allows for a more flexible and comprehensive approach to solving P.D.E's.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
232
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
133
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
260
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Back
Top