D'Alembert's Method 

The wave equation  

Diff(u(x, t), t, t) = `*`(`^`(c, 2), `*`(Diff(u(x, t), x, x))) 

can be put into the form  

diff(u(v, eta), eta, v) = 0 

by means of the substitutions 

v = `+`(x, `*`(c, `*`(t))) and eta = `+`(x, `-`(`*`(c, `*`(t)))) 

 

Integrating with respect to eta and with respect to v shows that   

 

u(x, t) = F[1]F[2]`+`(x, `-`(ct)) 

where F[1] and F[2] are arbitrary twice-differentiable functions, 

is a solution of the wave equation and is known as d'Alembert's solution, named after the French mathematician Jean le Rond d'Alembert (also educated in law and medicine). 

The two functions F[1] and F[2] can be determined using the initial conditions 

u(x, 0) = f(x) and  

 

d'Alembert's Solution 

The solution of the one dimensional wave equation  

, `and`(`<`(0, x), `<`(x, L)), `>`(t, 0) 

with initial conditions 

u(x, 0) = f(x) and for `and`(`<`(0, x), `<`(x, L)) 

and boundary conditions 

u(0, t) = 0 and u(L, t) = 0 for all `>`(t, 0) 

known as d'Alembert's solution is given by 

u(x, t) = `/`(1, 2) F(`+`(x, `-`(ct))) `/`(`+`(`*`(2, `*`(c))))G(`+`(x, ct)) where    

 

Fand denote the odd extensions of f and a is some fixed number. 

d'Alembert's Solution 

 

 

 

 

Example 3 

a) Derive d'Alembert's solution by determining the two arbitrary functions in the general solution using the initial conditions u(x, 0) = f(x) and  

b) Solve the one-dimensional wave equation with c = 1for a string of length L = 1 with zero initial velocity and a profile given byf(x) = sin`+`(`*`(3, `*`(Pi, `*`(x))))sin`*`(Pi, `*`(x)) 

Illustrate the motion of the string by animation and compare it by d'Alembert's solution. 

Solution 

> restart:MathMaple:-ini():
 

a) The wave equation is  

> pde:=diff(u(x,t),t$2)=c^2*diff(u(x,t),x$2):%;
 

diff(diff(u(x, t), t), t) = `*`(`^`(c, 2), `*`(diff(diff(u(x, t), x), x)))
 

The d'Alembert's solution is 

> pdesol:=pdsolve(pde,u(x,t)):%;
 

u(x, t) = `+`(_F1(`+`(`*`(c, `*`(t)), x)), _F2(`+`(`*`(c, `*`(t)), `-`(x))))
 

> pdesol:=subs(_F1=F[1],_F2=F[2],%):%;
 

u(x, t) = `+`(F[1](`+`(`*`(c, `*`(t)), x)), F[2](`+`(`*`(c, `*`(t)), `-`(x))))
 

> uxt:=unapply(rhs(pdesol),x,t):
 

> u(x,t)=uxt(x,t);
 

 

d'Alembert's solution satisfying the initial conditions 

> eq1:=uxt(x,0)=f(x):%;
 

`+`(F[1](x), F[2](`+`(`-`(x)))) = f(x)
 

> eq2:=D[2](uxt)(x,0)=g(x):%;
 

`+`(`*`((D(F[1]))(x), `*`(c)), `*`((D(F[2]))(`+`(`-`(x))), `*`(c))) = g(x)
 

Integrating gives 

> Int(lhs(eq2),x)=Int(subs(x=s,rhs(eq2)),s=a..x):%;
 

Int(`+`(`*`((D(F[1]))(x), `*`(c)), `*`((D(F[2]))(`+`(`-`(x))), `*`(c))), x) = Int(g(s), s = a .. x)
 

> eq3:=value(%):%;
 

`+`(`*`(c, `*`(F[1](x))), `-`(`*`(c, `*`(F[2](`+`(`-`(x))))))) = int(g(s), s = a .. x)
 

> eq1;
 

`+`(F[1](x), F[2](`+`(`-`(x)))) = f(x)
 

Solving for F[1](x) and F[2](`+`(`-`(x))) 

> sol:=solve({eq1,eq3},{F[1](x),F[2](-x)}):%;
 

{F[1](x) = `+`(`/`(`*`(`/`(1, 2), `*`(`+`(`*`(c, `*`(f(x))), int(g(s), s = a .. x)))), `*`(c))), F[2](`+`(`-`(x))) = `+`(`/`(`*`(`/`(1, 2), `*`(`+`(`*`(c, `*`(f(x))), `-`(int(g(s), s = a .. x))))), `*...
 

> F1:=unapply(subs(sol,F[1](x)),x): F2:=unapply(subs(sol,F[2](-x)),x):
 

The solution of  

> pde;
 

diff(diff(u(x, t), t), t) = `*`(`^`(c, 2), `*`(diff(diff(u(x, t), x), x)))
 

is then 

> u(x,t)=F1(c*t+x)+F2(c*t-x);
 

u(x, t) = `+`(`/`(`*`(`/`(1, 2), `*`(`+`(`*`(c, `*`(f(`+`(`*`(c, `*`(t)), x)))), int(g(s), s = a .. `+`(`*`(c, `*`(t)), x))))), `*`(c)), `/`(`*`(`/`(1, 2), `*`(`+`(`*`(c, `*`(f(`+`(`*`(c, `*`(t)), `-`...
 

> expand(%);
 

u(x, t) = `+`(`*`(`/`(1, 2), `*`(f(`+`(`*`(c, `*`(t)), x)))), `/`(`*`(`/`(1, 2), `*`(int(g(s), s = a .. `+`(`*`(c, `*`(t)), x)))), `*`(c)), `*`(`/`(1, 2), `*`(f(`+`(`*`(c, `*`(t)), `-`(x))))), `-`(`/`...
 

b) The solution is given by 

> f,g,L,c:=x-x^3,0,1,1;
 

`+`(x, `-`(`*`(`^`(x, 3)))), 0, 1, 1
 

> u(x,t)=VibratingString(f,g,L,c,infinity):
simplify(%) assuming n::integer;
 

u(x, t) = Sum(`+`(`/`(`*`(12, `*`(`^`(-1, `+`(1, n)), `*`(cos(`*`(n, `*`(Pi, `*`(t)))), `*`(sin(`*`(n, `*`(Pi, `*`(x)))))))), `*`(`^`(n, 3), `*`(`^`(Pi, 3))))), n = 1 .. infinity)
 

> uxt:=unapply(VibratingString(f,g,L,c,10),x,t):
p1:=plot(uxt(x,0),x=0..1,color=brown,legend=typeset(u(`x,0`))):
 

> u(0.6,0.2)=evalf(uxt(0.6,0.2));
 

u(.6, .2) = .3116941409
 

> u(0.6,0.3)=evalf(uxt(0.6,0.3));
 

u(.6, .3) = .2223974473
 

> u(0.6,0.5)=evalf(uxt(0.6,0.5));
 

u(.6, .5) = -0.3633501944e-1
 

> u(0.6,1)=evalf(uxt(0.6,1));
 

u(.6, 1) = -.3358653487
 

> animate(plot,[uxt(x,t),x=0..1,color=blue,thickness=2],t=0..3,frames=40,background=p1):%;
 

Plot_2d
 

> dAlembert(f,g,L,c,3,40,s):%;
 

Plot_2d
 

Click and start the animation. 

> u(0.6,1)=s(0.6,1);
 

u(.6, 1) = -.3360000000
 

The approximated solution above using 10 partial sums was u(.6, 1) = -.3358653487. 

Using 100 partial sums, we get 

> uxt:=unapply(VibratingString(f,g,L,c,100),x,t):
p1:=plot(uxt(x,0),x=0..1,color=brown,legend=typeset(u(`x,0`))):
 

> u(0.6,1)=evalf(uxt(0.6,1));