Orthogonal series and boundary value problems Calculations of some Fourier series

This is an evaluated Mathematica notebook. If you have Mathematica or MathReader (which is available free from WRI, you may download the notebook file. This notebook contains some Mathematica calculations for chapter VI, Notes on a vibrating string, of Harrell's WWW textbook.

(c) Copyright 1994,1995 by Evans M. Harrell, II. All rights reserved

A string with variable density and Airy's equation

A realistic string or optical fiber may not be uniform, so some of the simplifying
assumptions in our derivation fo the wave equation are not valid. For example, the
constant c^2 = (spring constant)/(mass density) for the spring may be different at different
positions, leading to an equation of the form

           2            2         2        2             2
   \partial u/\partial t  = (c[x]) \partial  u/\partial x

or, as a thorough examination of the derivation of the wave equation reveals, we could
more generally have:
         2            2      
 \partial u/\partial t  

     = p(x) (\partial /\partial x) s(x) \partial u/\partial x 

for some potentially complicated positive functions p(x) and s(x). How well does the method of separation of variables do for problems like this? Rather well, actually, although we may have to encounter some new functions.

Model Problem VI.3.. Suppose that the wave speed depends on position, so that
c^2 = 1/(1 + x), 0 < x < 1, DBC at 0 and 1.
Find the normal modes of vibration.

When we attempt to solve the equation with the ansatz u[t,x] = T[t] X[x], we find the
following eigenvalue problem.

- X''[x] = (1 + x) mu X[x]
There are actually some special functions, called Airy functions, which solve the ODE
y''[x] = x y. Two independent solutions are called Ai(x) and Bi(x), or, according to
Mathematica , AiryAi[x] and AiryBi[x].


  Plot[AiryAi[x], {x, -10,10}]


  Plot[AiryAi[x], {x, -5,3}];
  Plot[AiryBi[x], {x, -5,3}]



The function Bi explodes exponentially to the right, while Ai decays exponentially. They
both oscillate to the left (why?). By changing variables we can get these functions to solve
our eigenvalue equation:


  D[AiryAi[-mu^(1/3) (x+1)],{x,2}]


  -(mu (1 + x) AiryAi[-(mu    (1 + x))])

We need a linear combination Ai(- mu^(1/3) (1+x)) + C Bi ( - mu^(1/3) (1+x)) which is 0
at x=0 and 0 at x=1. I avoid the cube root at this stage by letting p = mu^1/3:


  FindRoot[{AiryAi[- p] + C AiryBi[- p] == 0, \
       AiryAi[- 2 p] + C AiryBi[- 2 p] == 0}, \


  {p -> 1.87088, C -> 0.819688}


  Plot[AiryAi[-1.87088 (1+x)] +.819688 AiryBi[-1.87088 (1+x)], \



The fact that this function has no nodes between 0 and 1, and therefore resembles sin(9 x),
indicates that this is the spatial part of the fundamental (lowest-frequency) mode. The
eigenvalue and normal mode are:


  mu0 = p /. %%;
  Mode0[t_,x_] = (A0 Cos[mu0 t] + B0 Cos[mu0 t]) *\
          (AiryAi[-1.87088 (1+x)] +.819688 AiryBi[-1.87088 (1+x)])


  (AiryAi[-1.87088 (1 + x)] + 0.819688 AiryBi[-1.87088 (1 + x)]) 
    (A0 Cos[1.87088 t] + B0 Cos[1.87088 t])


  FindRoot[{AiryAi[- p] + C AiryBi[- p] == 0, \
       AiryAi[- 2 p] + C AiryBi[- 2 p] == 0}, \