Re: Boundary Value Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg7059] Re: Boundary Value Problem
- From: Troy.D.Goodson at jpl.nasa.gov
- Date: Sat, 3 May 1997 22:04:51 -0400 (EDT)
- Organization: Reference.Com Posting Service
- Sender: owner-wri-mathgroup at wolfram.com
On 24 Apr 1997 05:04:15 -0400, "Rick A. Sprague" <sprague at egr.msu.edu> wrote: > Hello, > > Would anybody know how to solve this problem? As a mathcad user for about > 1 1/2 years, I have been trying to make the transition to MMA by doing > every problem out of the mathcad manual to learn MMA equivalents. I have > come to a problem, though, that seems to have stumped MMA. Can the > following problem be solved with out writing a lengthy MMA program? > > y'''''[x]+y[x]==0 > > Conditions > y[0]==0 > y'[0]==7 > > y[1]==1 > y'[1]==10 > y''[1]=5 This is a little late, and maybe someone else has solved it, but here is a solution from Matlab The solution I get is y(0)= 0 y'(0)= 7.0000 y''(0)= 12.2378 y'''(0)= 9.3279 y''''(0)= -39.5937 The trick is that this is a linear problem and be transformed to: y1 = y y2 = y' y3 = y'' y4 = y''' y5 = y'''' y5' = -y so if x = Transpose[y1 y2 y3 y4 y5], then dx/dt = Ax, where... >> A=[0 1 0 0 0; 0 0 1 0 0; 0 0 0 1 0; 0 0 0 0 1; -1 0 0 0 0] >> A1=A(:,1:2) A1 = 0 1 0 0 0 0 0 0 -1 0 >> B=exp(A); % The solution to the system is the matrix exponential % B = e^(A*t) % % The TPBVP can be solved if we break up B: % % B = [ B1 B2 ] (B1 is 5x2) % [ . . .] (B2 is 3x3) % [ . . .] % % we know y1(0), y2(0) but we need y3(0), y4(0), & y5(0) % so... % evaluate multiply the % leftmost 5x2 portion of B with the 2x1 vector of known % initial conditions >> B1=B(:,1:2); >> c=B1*[0; 7]; >> c1=c(1:3,:) c1 = 19.0280 7.0000 7.0000 >> d1=[1; 10; 5]; >> e1=d1-c1 e1 = -18.0280 3.0000 -2.0000 % % now we can solve e1=B2*yo, where % yo = Transpose[y3(0) y4(0) y5(0)] % >> B2=B(1:3,3:5) B2 = 1.0000 1.0000 1.0000 2.7183 1.0000 1.0000 1.0000 2.7183 1.0000 >> y2=inv(B2)*e1; >> y0=[0; 7; y2] y0 = 0 7.0000 12.2378 9.3279 -39.5937 >> B*y0 % % this shows that the solution matches the t=1 % boundary conditions % ans = 1.0000 10.0000 5.0000 -79.0611 -11.0280 Troy http://www.csun.edu/~kg46825/TGoodson.html -- Posted using Reference.COM http://www.reference.com Browse, Search and Post Usenet and Mailing list Archive and Catalog. InReference, Inc. accepts no responsibility for the content of this posting.