3 Nonhomogeneous heat PDE in 1D

 3.1 Nonhomogeneous PDE and Nonhomogeneous boundary conditions
  3.1.1 example 1

3.1 Nonhomogeneous PDE and Nonhomogeneous boundary conditions

  3.1.1 example 1

3.1.1 example 1

problem Solve

pict

Note: the boundary and initial conditions that are inconsistent at left end (but this is how the problem is, from the textbook, so please do not blame me).

Solution

This problem has nonhomogeneous B.C. and non-homogenous in the PDE itself (source present). First step is to use reference function to remove the nonhomogeneous B.C. then use the method of eigenfunction expansion on the resulting problem.

Let

r (x) = cx + c
        1    2

At x = 0,r(x) = 1  , hence 1 = c2  and at x = π,r(x) = 0  , hence 0 = c1π +1  or c1 = − 1
      π  , hence

|r-(x)-=-1−-x--|
-----------π--

Therefore

u (x,t) = v(x,t)+ r(x)

Where v(x,t)  solution for the given PDE but with homogeneous B.C., therefore

pict

We now solve (1). This is homogeneous in the PDE itself. To solve, we first solve the nonhomogeneous PDE in order to find the eigenfunctions. Hence we need to solve

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

This has solution

        ∑∞
v (x,t) =    an(t)ϕn (x)
        n=1
(2)

With

pict

Plug-in (2) back into (1) gives

pict

But ∂∂2x2ϕn(x) = − λnϕn = − nϕn  , hence the above becomes

pict

Therefore, since Fourier series expansion is unique, we can compare coefficients and obtain

                {
 ′      2         e− 2t    n = 5
an (t)+ n an(t) =    0     n ⁄= 5

For the case n = 5

pict

Hence

        −2t
a5(t) = e---+ ce−25t
        23

At t = 0,  a5(0) = 1-+ c
        23  , hence

c = a5(0)−-1
          23

And the solution becomes

               (          )
       -1 −2t           1-  − 25t
a5(t) = 23e  +  a5 (0) − 23  e

For the case n ⁄= 5

pict

At t = 0,  an (0) = c  , hence

             −nt
an(t) = an(0)e

Therefore

       {  1e−2t + (a (0)−-1)e−25t   n = 5
an(t) =   23        5  −n22t3
                an(0)e              n ⁄= 5

To find a  (0)
  n  we use orthogonality.  Since u (x,t) = v (x,t)+ r(x)  , then

        ( ∑∞            )   (    x)
u (x,t) =     an (t)sin (nx ) +  1 − --
          n=1                    π

And at t = 0  the above becomes

   ( ∞∑             )   (     )
0 =     an(0)sin (nx)  +  1 − x-
     n=1                     π

Or

        ∞
x-− 1 = ∑ a  (0)sin(nx)
π      n=1 n

Applying orthogonality

∫ π(     )                  ∫ π
     x-− 1 sin(n′x)dx = a ′ (0)   sin2(n′x )dx
 0   π                  n    0

Therefore

pict

Therefore a5(0) = −2
       5π  . Hence

       {         (       )
          123e−2t + −52π − 123 e−25t   n = 5
an(t) =          −n2πe−n2t          n ⁄= 5

Where

pict

Animation for 3 seconds