home
PDF (letter size
PDF (legal size

Analytical solutions to some textbooks PDE’s using computer algebera systems

Nasser M. Abbasi

July 20, 2017 compiled on — Thursday July 20, 2017 at 11:26 AM

1 Introduction and lookup table

This is a collection of PDE problems solved analytically using CAS. Current systems used are Maple 2017 and Mathematica 11.1.1. Problems are mostly taken from textbooks and help pages. A number of these I solved by hand as well for HW’s.

For each problem, the CAS commands used are given, and a comment is given about the solution produced. This is work in progress.

It is clear from the results obtained, that CAS is still not very strong at solving PDE’s analytically (compared to solving ODE’s for example). All the PDE’s that were tried below are basic ones, which all can be solved by hand analytically at the level of undergraduate or first year graduate level, but a number of them could not be solved, or the solution given was incomplete or wrong.

Notation used in the table below: T1 is textbook Richard Haberman applied partial differential equations 5th edition. T2 is David J. Logan’s Applied Partial Differential Equations.

ToDo: Need to make summary of missing features or class of PDE’s CAS can’t solve.

In Maple the command pdsolve is used and in Mathematica the command DSolve is used.

Summary lookup table of result




Problem

Mathematica

Maple







T1, Problem 2.3.3(a) (heat PDE, 1D)

Solved

Solved




T1, Problem 2.3.3(b) (heat PDE, 1D)

Solved

Solved




T1, Problem 2.3.3(c) (heat PDE, 1D)

Solved

Solved




T1, Problem 2.3.3(d) (heat PDE, 1D)

Solved

Solved




T1, Problem 2.3.7 (heat PDE, 1D)

Solved

Partially correct. Missing zero eigenvalue




T1, Problem 2.3.8 (heat PDE, 1D)

Did not solve

Solved




T1, Problem 2.4.1(a) (heat PDE, 1D)

Solved

Partially correct. Missing zero eigenvalue




T1, Problem 2.4.1(b) (heat PDE, 1D)

Solved

Did not solve




T1, Problem 2.4.1(c) (heat PDE, 1D)

Solved

Partially correct. Missing zero eigenvalue




T1, Problem 2.4.1(d) (heat PDE, 1D)

Solved

Did not solve




T1, Problem 2.4.2 (heat PDE, 1D)

Solved

Partially correct. Used 2n + 1  instead of 2n − 1  ?




T1, Problem 2.5.1(a) (Laplace PDE, 2D)

Solved

Did not solve




T1, Problem 2.5.1(b) (Laplace PDE, 2D)

Solved

Did not solve




T1, Problem 2.5.1(c) (Laplace PDE, 2D)

Did not solve

Did not solve




T1, Problem 2.5.1(d) (Laplace PDE, 2D)

Did not solve

Did not solve




T1, Problem 2.5.1(e) (Laplace PDE, 2D)

Did not solve

Did not solve




T1, Problem 2.5.5(c) (Laplace PDE,quarter circle)

Did not solve

Error in input. Need to find why




T1, Problem 2.5.8(b) (Laplace on circular annulus)

Did not solve

Did not solve




T2, page 115 (Wave PDE 1D nonhomogeneous)

Solved

Solved




T2, page 76 (heat PDE 1D)

Solved

Solved




T2, page 28 (Wave PDE 1D)

Did not solve

Solved




T2, page 130 (Wave PDE 1D)

Did not solve

Partially correct. Used 2n + 1  instead of 2n − 1  ? as above.




T2, page 131 (heat PDE 1D, periodic BC)

Did not solve

Solved




T2, page 149 (wave PDE 1D, nonhomogeneous)

Did not solve

Solved




T2, page 213 (wave PDE 1D, nonhomogeneous)

Did not solve

Solved




T2, page 30 (Schrodinger PDE with zero potentia)

Solved

Solved




Problem 18 (Maple help page, p20, Laplace PDE, 1D)

Solved

Solved




PDE 2 (Maple help p14, wave PDE 1D)

Solved

Solved




PDE 3 (Maple help p14, heat PDE 1D)

Solved

Solved




PDE 4 (Maple help p15, heat PDE 1D)

Solved

Solved




heat absorption radiation in bounded domain

Did not solve

Solved




heat PDE infinite domain with initial conditions, nonhomogeneous

Solved

Solved




PDE 23, page 23, from Maple pdsolve help PDF file

Solved

Solved




heat PDE on 1D with boundary conditions from − 1...1

Did not solve

Did not solve




2 Problem 2.3.3, Richard Haberman applied partial differential equations, 5th edition, (heat PDE, 1D)

pict

2.1 part a

2.1.1 Maple
            (    )      2
u (x,t) = 6 sin 9 πx e− 81kπL2t
               L

comment Solution is correct.

2.1.2 Mathematica
                   (    )
          − 81π22kt-    9πx-
u(x,t) → 6e  L  sin   L

comment Solution is correct.

2.2 part b

2.2.1 Maple
           (πx)    kπ2t(      (  πx)     kπ2t   )
u(x,t) = sin --- e−9 L2   − 2cos 2--- +3e8 L2 − 1
            L                   L

comment Verified OK against my analytical solution.

2.2.2 Mathematica
                       (            (     )   )
u(x,t) → e− 9π2L2ktsin( πx) 3e8πL2k2t− 2 cos  2πx- − 1
                   L                   L

comment Ok

2.3 part c

2.3.1 Maple
        ∞
u(x,t) = ∑ 4((− 1)n +-1)n-sin (πxn-)e− π2kLtn22
        n=1   π(n2 − 9)      L

comment I did not solve this by hand. Assuming solution is correct.

2.3.2 Mathematica
( (                                       ) )
{ {         ∞∑  4(1+ (− 1)n)e− kn2Lπ22tn sin(nπx)} }
( (u (x,t) →    ---------(n2 −-9)π------L--) )
            n=1

comment Solved, and gives same solution as Maple, assuming correct solution.

2.4 part d

2.4.1 Maple
u(x,t) = ∞∑  2cos(1∕2πn)+-2+-4-(−-1)1+n-sin (πnx-)e− kπ2Ln22t
        n=1           πn                 L

comment Verified correct solution, compared to my hand solution.

2.4.2 Mathematica
( (                                                 ) )
{ {         ∞∑  4e− knL2π22t(4cos(nπ) +3) sin2(nπ) sin(nπx)} }
( (u (x,t) →    ---------------2-nπ--------4------L--) )
            n=1

comment Solved, form is little different from Maple and my solution, but verified to be same by numerically evaluating at random times and locations.

3 Problem 2.3.7, Richard Haberman applied partial differential equations, 5th edition (heat PDE, 1D)

pict

3.1 Maple

         ∞  (   ∫ L        (    )     (    )        )
u (x,t) = ∑   21-    f (x)cos nπx dx cos  nπx- e− kπ2nL22t
        n=1   L  0           L           L

comment Answer is partially correct. This is a problem I found in Maple’s solutions when both ends of the heat PDE are insulated. Maple overlooks the zero eigenvalue and seems to assume eigenvalues are all greater than zero. See my analytical solution. As the book also shows in the answer it gives.

3.2 Mathematica

pict

comment Solved. Mathematica did better here than Maple as it accounted for the zero eigenvalue.

4 Problem 2.3.8, Richard Haberman applied partial differential equations, 5th edition (heat PDE, 1D)

pict

4.1 Maple

         ∞ (    [∫ L       (    )   ]   (    )   (2  2 2    ))
u(x,t) = ∑   21-    f (x)sin n-πx dx sin  nπx- e− t-πkn+LL2-alpha
        n=1   L   0          L            L

comment Ok.

4.2 Mathematica

comment Did not solve. Input returned.

5 Problem 2.4.1, Richard Haberman applied partial differential equations, 5th edition (heat PDE, 1D)

pict

5.1 part a

5.1.1 Maple
         ∞                (    )
u(x,t) = ∑ − 2sin(1∕2πn)-cos  πnx- e− kπ2L2n2t
        n=1      πn          L

comment Partially correct. Same problem as mentioned earlier. Maple overlooks the zero eigenvalue. The correct answer is

            ∞                 (    )
u(x,t) = 1 + ∑ − 2 sin(1∕2πn)cos πnx- e− kπL2n22t
        2   n=1      πn          L

5.1.2 Mathematica
( (                   22                  ) )
|| ||          ∞∑    e− knπL2-tLcos(nπLx)sin(nπ2-)  || ||
|{ |{         2n=1−----------nπ----------  1|} |}
| |u(x,t) →             L              + 2| |
||( ||(                                       ||) ||)

comment Mathematica gives the correct answer. It accounts for the zero eigenvalue.

5.2 part b

5.2.1 Maple

comment Did not solve. Returned ().

5.2.2 Mathematica
                  (    )
          − 9π2k2t    3πx-
u(x,t) → 4e  L  cos   L   + 6

comment Ok

The above is verified using Maple

5.3 part c

5.3.1 Maple
         ∞
u (x,t) = ∑ 4 (−-1)n-+-1cos( nπx) e− kπ2Ln22t
        n=1  π(n2 − 1)     L

comment Partially correct. Overlooked the zero eigenvalue.

5.3.2 Mathematica
( (                        2 2            ) )
|| ||          ∞∑  2(1+(−1)n)e−-knLπ2-tL-cos(nLπx)-   || ||
|{ |{         2n=1        (n2− 1)π           4|} |}
| |u(x,t) → ------------L--------------− π| |
||( ||(                                       ||) ||)

comment Correct solution. Mathematica accounted for the zero eigenvalue.

5.4 part d

5.4.1 Maple

comment Did not solve. Returned ().

5.4.2 Mathematica
               2     (    )
u(x,t) → − 3e− 64πL2ktcos 8πx
                        L

comment Ok

Verified by Maple:

6 Problem 2.4.2, Richard Haberman applied partial differential equations, 5th edition (heat PDE, 1D)

pict

6.1 Maple

         ∞ (                   (              )∫ L        (             )   )
u(x,t) = ∑   21e− 1∕4kπ2(1L+22n)2tcos  1∕2π(1+-2n)x-     f (x)cos 1∕2 π(1+-2n)x dx
        n=1   L                         L        0                 L

comment This seems to be wrong solution. It should be 2n− 1  and not 2n + 1  . Otherwise, the sum should start from zero. See Mathematica solution below which also matches my hand solution.

6.2 Mathematica

                          (          )         [   (          )            ]
        -2∑∞  − k(2n+1)22π2t    (2n+-1)πx-              (2n-+1)πx-
u(x,t) → L    e    4L    cos     2L      Integrate cos     2L     f(x),{x,0,L}
          n=0

comment Correct solution.

7 Problem 2.5.1, Richard Haberman applied partial differential equations, 5th edition (Laplace PDE, 2D)

pict

7.1 part a

7.1.1 Maple

comment Did not solve. Returned ().

7.1.2 Mathematica
                   (   )    (    )(∫     (   )      )    (   )
y∫L f(x)dx  ∑∞ 2 cos nπLx  csch  HnLπ-  0Lcos nπLx f(x)dx sinh nπLy
--0-------+    -----------------------------------------------
   HL       n=1                       L

comment Solved Ok.

7.2 part b

7.2.1 Maple

comment Did not solve. Returned ().

7.2.2 Mathematica
                   (nπ(L−x))     (   )(∫ H       (   )  )   (   )
        ∑∞   2 cosh  --H---- csch  LnHπ   0 g(y)sin  nπHy dy sin nπHy
u(x,y) →    − -------------------------nπ------------------------
        n=1

comment Solved Ok.

7.3 part c

7.3.1 Maple

comment Did not solve. Returned ().

7.3.2 Mathematica

comment Could not solve.

The solution is

                     [∫               ]
        ∑∞ 2----1----   H       n-πy        nπx-  n-πy
u(x,y) =   H cosh nπHL  0  g(y)sin H  dy cosh H   sin H
        n=1

7.4 part d

7.4.1 Maple

comment Did not solve. Returned ().

7.4.2 Mathematica

comment Could not solve.

7.5 part e

7.5.1 Maple

comment Did not solve. Returned ().

7.5.2 Mathematica

comment Could not solve.

8 Problem 2.5.5 part(c), Richard Haberman applied partial differential equations, 5th edition (heat PDE, semi-disk)

pict

8.1 Maple

comment I get an error which I do not understand. Here it is

8.2 Mathematica

comment Did not solve.

9 Problem 2.5.8 part(b), Richard Haberman applied partial differential equations, 5th edition (Laplace on circular annulus)

pict

9.1 Maple

comment Did not solve.

9.2 Mathematica

comment Did not solve.

10 page 115, David J Logan textbook, applied PDE (Wave PDE 1D nonhomogeneous)

Falling cable lying on a table that is suddenly removed.

∂2         2 ∂2
∂t2u (x,t) = c ∂x2-u(x,t) − g

With initial conditions

pict

And boundary condition

u(0,t) = 0

10.1 Maple

           g (         (   x )       2     )
u(x,t) = 1∕2c2 Heaviside t− -c (ct− x) − c2t2

comment Solved.

10.2 Mathematica

           (                    )
u(x,t) → 1 g (t − x)2θ (t− x) − t2  − c δ(t− x-)
        2        c        c          1     c

comment Solved.

Verify Mathematica solution using Maple

11 page 76, David J Logan textbook, applied PDE (heat PDE 1D)

-∂u (x,t) = ∂2-u(x,t)
∂t         ∂x2

With initial conditions

pict

And boundary condition

u (0,t) = f(t)

11.1 Maple

              ∫
           -x-  t --f ( U-1)-−4t−x42U1
u(x,t) = 1∕2√ π-0 (t− -U 1)3∕2e       d U 1

comment Solved.

11.2 Mathematica

                  [f(K-[2])e−4(tx−2K[2])-         ]
         xIntegrate    (t−K[2])3∕2  ,{K [2],0,t}
u(x,t) → ----------------√------------------
                        2  π

comment Solved.

12 page 28, David J Logan textbook, applied PDE (Wave PDE 1D)

-∂2u(x,t) = c2-∂2u (x,t)
∂t2          ∂x2

With boundary conditions

pict

12.1 Maple

        ∑∞    (    )(          (    )            (     ))
u(x,t) =   sin  nπx-   C1 (n)sin  cnπt  + -C5 (n) cos  cnπt
        n=1     L                 L                 L

comment Solved.

12.2 Mathematica

comment Could not solve.

13 page 130, David J Logan textbook, applied PDE (Wave PDE 1D)

Solve

  2            2
-∂2u(x,t) = c2-∂2u (x,t)
∂t           ∂x

With initial conditions

pict

And boundary conditions

pict

13.1 Maple

        ∑∞ (  1 ∫ L       (   π (1+ 2n)x)      (    π(1+ 2n)x )   (    cπ(1+ 2n)t))
u(x,t) =     2--   f (x)sin 1∕2---------  dx sin  1∕2 ---------- cos  1∕2-----------
        n=1   L  0                 L                    L                  L

comment Solved. But sum is wrong. It should be 2n − 1  and not 2n+ 1  . If 2n + 1  is to be used, then the sum index should start from zero and not one.

13.2 Mathematica

comment Did not solve.

14 page 131, David J Logan textbook, applied PDE (heat PDE 1D, periodic BC)

Solve

∂-u(x,t) = k-∂2-u(x,t)
∂t         ∂x2

With initial conditions

pict

And boundary conditions

pict

14.1 Maple

              ∑∞  (  ( ∫ 2L        (    )      (    )  ∫ 2L       (    )      (    ))     22 )
u(x,t) =-C8∕2+     1-      f (x)cos nπx dx cos nπx- +     f (x )sin  nπx- dxsin  nπx-   e− kπLn2-t
              n=1  L    0           L           L      0            L          L

comment Solved.

14.2 Mathematica

comment Did not solve.

15 page 149, David J Logan textbook, applied PDE (wave PDE 1D, nonhomogeneous)

Solve

-∂2         2-∂2-
∂t2u (x,t) = c ∂x2 u(x,t) +p(x,t)

With initial conditions

pict

And boundary conditions

pict

15.1 Maple

               ( ∫                                    )
        ∫ t∑∞     π0 p(x,τ)sin (nx )dxsin (nx )sin(cn(t− τ))
u(x,t) = 0      2-----------------πnc-----------------  dτ
           n=1

comment Solved.

15.2 Mathematica

( (           ∞   ) )
{ { u(x,t) →  ∑   0} }
( (               ) )
            K[1]=1

comment Did not solve. Gives only trivial solution.

16 page 213, David J Logan textbook, 3rd ed, applied PDE (nonhomogeneous wave PDE 1D)

Solve

 2            2
∂--u(x,t) = c2 ∂-u(x,t)+ Ax
∂t2          ∂x2

With initial conditions

pict

And boundary conditions

pict

16.1 Maple

               (                                             )
        ∫ t ∞∑     A  ∫ L     (nπx )     ( nπx)   ( nπc(t− τ))
u (x,t) =        2 nπc-   xsin  -L-- dxsin  -L-- sin  ----L----   dτ
          0 n=1       0

comment Solved.

16.2 Mathematica

comment Did not solve.

17 page 30, David J Logan textbook, applied PDE (Schrodinger PDE with zero potential)

Solve

               2  2
Ih-∂f (x,t) = − h-∂-f-(x,2t)
  ∂t         2m    ∂x

With boundary conditions

pict

17.1 Maple

        ∑∞          ( nπx)  −i∕2hπ2n2t
f (x,t) =    C1 (n)sin  -L-- e  mL2
        n=1

comment Solved.

17.2 Mathematica

         ∞              (    )
f(x,t) → ∑ e− ih2nL2π22mtcnsin nπx-
        n=1               L

comment Solved.

18 Problem 18, from Maple help page (Laplace PDE, 1D)

Solve

∂2          ∂2
--2u (x,y)+  --2u(x,y) = 0
∂x          ∂y

With

        sin(y)
u(0,y) =   y

18.1 Maple

u (x,y) = sin(−-y+-ix)+-F-2(y−-ix)(y−-ix)+-(− y-+-ix)-F-2(y+-ix)
                               − y + ix

comment Solved.

18.2 Mathematica

u(x,y) → (sinh(x)−-cosh(x))(2xcos2(y)−-ysin(y))+-x
                       x + y

comment Solved.

Verify Mathematica solution using Maple

19 PDE 2 from Maple PDF help, page 14 (wave PDE 1D)

Solve

-∂2         2-∂2-
∂t2u(x,t) = c ∂x2u (x,t)

With initial conditions

pict

And boundary condition

u(0,t) = g(t)

19.1 Maple

                 (     )  (     )
u(x,t) = Heaviside t− x g  ct−-x
                      c      c

comment Solved.

19.2 Mathematica

                ( 0  x)    x > ct
u(x,t) → {     g t−  c     x ≤ ct
             Indeterminate  True

comment Solved.

20 PDE 3 from Maple PDF help, page 14 (heat PDE 1D)

Solve

∂-u(x,t) = k-∂2-u(x,t)
∂t         ∂x2

With initial conditions

pict

And boundary condition

u(0,t) = 1

20.1 Maple

               (        )
                   --x√---
u(x,t) = 1 − erf 1∕2√ t k

comment Solved.

20.2 Mathematica

u(x,t) → erfc( √x--)
              2 kt

comment Solved.

21 PDE 4 from Maple PDF help, page 15 (heat PDE 1D)

Solve

∂           ∂2
∂tu(x,t) = k∂x2-u(x,t)

With initial conditions

pict

And boundary condition

u(0,t) = λ

21.1 Maple

                   (      x  )
u(x,t) = (− λ + μ)erf 1∕2√-√-- + λ
                         t  k

comment Solved.

21.2 Mathematica

            (     )       (     )
u(x,t) → μerf-√x--  + λerfc  -x√---
             2  kt          2 kt

comment Solved.

22 heat absorption radiation in bounded domain

Solve

∂-         -∂2-
∂tu(x,t) = k∂x2 u(x,t)

With initial conditions

pict

And boundary condition

pict

22.1 Maple

              ∑∞  (   ( ∫ L       (    )     (    )   ∫ L       (    )      (    ))     2 2)
u(x,t) =-C8∕2+     21-     f (x)sin nπx dx sin  nπx- +    f (x )cos  nπx- dxcos  nπx-  e− kπLn2t
              n=1   L    0          L           L      0           L           L

comment Solved.

22.2 Mathematica

comment Did not solve.

23 heat PDE, infinite domain with initial conditions, nonhomogeneous

Solve

∂-         -∂2-
∂tu(x,t) = k∂x2 u(x,t) +m

With initial conditions

pict

23.1 Maple

u(x,t) = sin (x) e− kt +mt

comment Solved.

23.2 Mathematica

         −kt
u(x,t) → e  sin(x)+ mt

comment Solved

24 PDE 23, page 23, from Maple pdsolve help PDF file

Solve

∂2-        1-∂-       -1-∂2
∂r2u(r,t)+ r∂ru (r,t)+ r2∂t2u (r,t) = 0

With boundary conditions

pict

24.1 Maple

u (r,t) = 5ln(r)
         ln(2)

comment Solved.

24.2 Mathematica

{{                 5log(r)               }}
   u(r,t) →  {      log(2)     1 ≤ r ≤ 2
                Indeterminate    True

comment Solved

25 heat PDE on 1D with boundary conditions from − 1...1

Solve

 ∂         ∂2
∂tu (x,t) = ∂x2u(x,t)

With boundary conditions

pict

And initial conditions

u(x,0) = f(x)

25.1 Maple

comment Did not solve.

25.2 Mathematica

comment Did not solve.