Eigen Function Expansion and Applications. In this worksheet we will use the eigenfunction expansion to solve nonhomogeneous equation. a/ The theory. b/ Example: Solving the Euler equation in two ways. c/ Example: non uniqueness of solution. The idea is simple: a/ The theory: Let L be a regular Sturm-Liouville operator on an interval ( a, b) together with regular boundary conditions. That is, (note the minus sign in front of the nd derivative) L( u) + x p( x u q( u Let f be a function in L ( a, b). We consider the problem Lu f We denote by l n, f ( n, the eigenvalues and corresponding normalized eigenfunctions of L. L ( ) () We know that { } makes a complete orthonormal set in L ( a, b). We write f as f( n () where is the fourier coefficients of f with respect to the base { }. Let's assume that the solution u of the nonhomogeneous equation can be expressed as u( n u n (5) We want to compare the coefficients u n in (5) with those in (). Formally, we apply the operator L to the infinite sum (5) to compute L( u ). Lu( L n n x u n L ( ) u n φ (, ) n Using () and the equation (3) we have n u n Page
n u n φ (, ) n x n We then equalize the coefficients of on both sides and find u n (see the note that follows) u( n (6) l n. Using this in (5) we have Important: If 0 for some n, that is if 0 is an eigenvalue for L then the above makes no sense (dividing by 0) unless 0 accordingly. We can see this from the relation u n. Thus, we must have f( dx 0. In other words, a b The right hand side f must be orthogonal to all eigenfunctions which correspond to the 0 eigenvalue, in order the equation Lu f has a solution. Moreover, if this is the case then the corresponding u n can be arbitrary constant. This also says that the problem Lu f does not have an unique solution. In fact, let us denote the eigenfunctions corresponding to the zero eigenvalue by ψ (,,..., ψ ( m, and the eigenfunctions corresponding to the nonzero eigenvalues by φ (,,...,,... Then the solution to Lu f is not unique and given by m u( C i ψ ( i, + i where the constants { C i } are arbitrary. n EXAMPLE : Consider the Euler operator with Neumann conditions [Sturm-Liouville type for p(, q( 0, w( ] over the interval I { x 0 < x < b }. The boundary conditions are type at both end points. Euler differential operator Boundary conditions L( y ) x x y( y ( 0 ) 0 and y ( b) 0 x x a/ Can we find the Green function following the formula? b/ Find the expansion of the Green function in terms of the eigenfunctions (see (7). Page
c/ What is the condition should be imposed on f such that the equation L( u) f has a solution? d/ Let b, and f( x Compare by graphing. f/ let b sin( π. Solve Lu f using the undetermined constant method and the series method. and f be the piecewisedefined function x 0 and x 0 x 0 and x 0 Solve the problem L( u) f using eigenfunction series (6). Compare the results by graphing. Solution: a/ Green function: To compute the Green function according to the text, we have to find two fundamental solutions u,u of Lu 0 which satisfy the BC at the ends respectively. Since the general solution of Lu 0 is > restart:u:x->c + C*x; u : x C + C x We determine u and u by finding the constants to match the BC. At x 0, we have > subs(x0,diff(u(,0); So we can take u(. At x b we have > subs(xb,diff(u(,0); C 0 C 0 Again, u must be a constant. However, u,u cannot make two linear independent solutions. Hence, the formula for the Green function cannot be applied here! b/ Eigenfunction expansion for G: We need to determine the eigenvalues and eigenfunctions of the Euler differential operator with Neumann BC. As an exercise, you should check that: λ 0 0 is an eigenvalue with the normalized eigenfunction f ( 0, In fact, this causes the nonexistence of two linear independent solutions. The other eigenvalues and corresponding normalized eigenfunctions are > lambda[n]:n^*pi^/b^; n π : b > phi:(n,->sqrt(/b)*cos(n*pi*x/b); φ : ( n, cos n πx b b Thus the partial eigen-expansion for G is given by (excluding the first eigenfunction φ ( 0, ) > G_Pseries:(m,x,z)->sum(phi(n,*phi(n,z)/lambda[n],n..m); G_Pseries : ( m, x, z) Page 3 m n φ (, ) n x z ) b.
Let's take m and plot the graph of this partial sum. > b::eval(g_pseries(,x,z)); cos( π cos( π z ) cos( π cos( π z) + π π > plot3d(g_pseries(0,x,z),x0..,z0..); c/ Solvability condition: Since the 0 is an eigenvalue, in order to the problem Lu f has a solution we must have that f is orthogonal to the eigenfunction φ ( 0, to this eigenvalue 0. That is, b > Int(f(*/sqrt(b),x0..b)0; f( dx 0 d/ Solve the equation by undetermined constant method: The right hand side f( We check the solvability condition > f:x->(x-/)*sin(pi*; eval(int(f(,x0..)); 0 f : x x sin( π x sin( π. 0 We looking for a particular solution of the form: u p ( ( A x + B ) sin( π + ( C x + D ) cos( π where A, B are constants to be determined. > up:x->(a*x+b)*sin(pi*+(c*x+d)*cos(pi*; Page 4
up : x ( A x + B ) sin( π + ( C x + D ) cos( π Substitute this into the equation Lu f, we have > diff(up(,x, (x-/)*sin(pi*; collect(%,[sin(pi*,cos(pi*]); A cos( π π ( A x + B ) sin( π π C sin( π π ( C x + D ) cos( π π x sin( π ( ( A x + B) π C π ) sin( π + ( A π ( C x + D) π ) cos( π x Compare the coefficients, we infer that > A:-/Pi^; B:/(*Pi^); C:0; D:-/Pi^3; A : B : π π C : 0 D : π 3 > diff(up(,x,f(; #check against the equation sin( π x + sin( π π π π x sin( π So, a particular solution is ( A x + B ) sin( π + D cos( π and the general solution is then given by > u:x->c3 + C*x + up(; u : x C3 + C x + up( We need to find the constants to match the BC. > subs(x0,diff(u(,)0; subs(x,diff(u(,)0; sin( 0 ) C + + π sin( π) C + π Thus, the solution is ( C and C is arbitrary). > u:x->-/(*pi)*x + up(; x u : x + π > F[n]:int(f(*phi(n,,x0..); cos( 0) π cos( π) π up( 0 0 Page 5
( 4 sin( n π) n cos( n π) π + cos( n π) π n + π π n ) F n : π ( + n) ( + n ) > F[]:int(f(*phi(,,x0..); F Then the "Fourier" coefficients for u is given by > U[n]: -F[n]/lambda[n]; U[]: -F[]/subs(n,lambda[n]); U n : : F n 4 π ( 4 sin( n π) n cos( n π) π + cos( n π) π n + π π n ) π 4 ( + n) ( + n ) n U : 4 Thus, the (partial) "Fourier" series for u is > up_series:(m,-> U[]*phi(, + sum(u[n]*phi(n,,n..m); up_series : ( m, U φ (, + > eval(up_series(3,); cos( π π 3 36 π 3 m n cos( 3 π π 3 U n Finally, we plot the result given by the integral and the partial sum above in the same graph for a comparison. It can be seen that, even with one term ( m ), the partial sum approximates well the solution. > plot([u(,up_series(3,],x0..,color[red,blue],title"green_so l: RED, Partial Sum: BLUE"); Page 6
One can see that the two graphs are away from each other by a constant distance. This tells us that u( and the solution given by the series are different by just a constant. This is in accordance with what we know in the case the homogeneous problem has nonzero solution so that the nonhomogeneous equation exhibits nonuniqueness. f/ Define new f: > f:x->piecewise([-, -x < 0 and x-/ < 0],[, /-x < 0 and x- < 0]); - x 0 and x 0 f : x x 0 and x 0 > int(f(,x0..); #check the solvability condition 0 > F[n]:int(f(*phi(n,,x0..); F n : sin n π sin( n π) n π Then the "Fourier" coefficients for u is given by > U[n]: -F[n]/lambda[n]; F n Page 7
sin n π sin( n π) U n : n 3 π 3 Thus, the (partial) "Fourier" series for u is > up_series:(m,-> sum(u[n]*phi(n,,n..m); Let's compute few terms of this series > eval(up_series(3,); up_series : ( m, cos( π 4 4 π 3 7 We plot the series with 50 (!) terms > plot(up_series(50,,x0..); m n cos( 3 π π 3 U n To check against the equation we can plot the nd derivative of the partial series and the function f(. We can see that they are pretty close! > plot([diff(up_series(50,,x,,f(],x0..,color[red,blue],titl e"nd derivative: RED, f(: BLUE",disconttrue); Page 8
> Page 9