Solving Partial Differential Equations

Partial Differential Equations
You can solve a variety of linear partial differential equations of the first or second order; that is,
equations of the form
A u  B u  Cu  E
x
y
or
2
2
2
A  u2  B  u  C  u2  E u  F u  Gu  H
xy
x
y
x
y
where A, B, C, E, F, G, and H are constants or functions of x and y. These equations can also be written
using the operator notation
AD x u  BD y u  Cu  E
or
AD xx u  BD xy u  CD yy u  ED x u  FD y u  Gu  H
Other traditional notation, such as u xy , may not be recognized.
Solving Partial Differential Equations
To solve a partial differential equation
1.
2.
Type the partial differential equation using standard mathematical notation.
With the insertion point in the equation, choose Solve PDE.
Solve PDE
2u
x 2

2u
y 2
 0, Exact solution is : ux, y  F 1 y  x  F 2 y  x
To verify that ux, y  F 1 y  x  F 2 y  x is actually a solution, define F 1 x and F 2 x to be generic
functions and define
ux, y  F 1 y  x  F 2 y  x
Then Evaluate yields
 2 ux, y
 F 1 y  x  F 2 y  x
x 2
and
 2 ux, y
 F 1 y  x  F 2 y  x
y 2
and hence
 2 ux, y
 2 ux, y
0

x 2
y 2
Example The choice
ux, y  siny  x  cosy  x
yields
 2 ux, y
  siny  x  cosy  x
x 2
and
 2 ux, y
  siny  x  cosy  x
y 2
and clearly
 2 ux, y
 2 ux, y
0

x 2
y 2
Wave Equation
Use Solve PDE to solve the wave equation.
Solve PDE
2y
2y
 a 2 2 , Exact solution is : yt, x  F 1 x  at  F 2 x  at
2
t
x
Example Let yx, t denote a vertical displacement of a vibrating string at position x and time t. Then yx, t
satisfies the wave equation
2y
2y
 a2 2
2
t
x
and has the solution
yx, t  F 1 t  ax  F 2 t  ax
Take
F 1 x  sinx  sin3x
and
F 2 x  sin5x
and define
yx, t  F 1 t  3x  F 2 t  3x
 sint  3x  sin3t  3x  sin5t  3x
The following figure includes graphs of y0, x (in red), y0.01, x (in blue), and y0.02, x (in green).
Plot 2D  Rectangular y0, x
Select and drag to the frame y.01, x
 Select and drag to the frame y.02, x

1
0
0.2
0.4
x
0.6
0.8
1
-1
-2
The following surface shows the changing shape of the string as time varies from 0 to 1.
Plot 3D  Rectangular yt, x

Plot Style  Hidden Line, 0  x  1, 0  t  1
2
1
0
-2
0
0.8
0.2
0.6
t
0.4
0.4
x 0.6
0.8
0.2
1 0
Related topics






Ordinary Differential Equations
Systems of Ordinary Differential Equations
Numerical Methods for ODEs
Two Dimensional Plots of Functions and Expressions
Three Dimensional Plots of Functions and Expressions
Exercises and Solutions
Differential equations, Partial differential equations, Plotting 2D, Plotting 3D, Solve PDE