16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.3. VARIATIONAL CALCULUS MODELS 193<br />

The boundary conditions that Y =0atx =0andatx = a are imposed in bc1<br />

and bc2 , which are then solved for K1 and C1 insol2 .<br />

> bc1:=eval(Y,x=0)=0; bc2:=eval(Y,x=a)=0;<br />

p<br />

bc1 := K1 ¡ ¸2 ¡ C1 2 =0<br />

p<br />

bc2 := K1 ¡ ¸2 ¡ C1 2 ¡ a2 +2a C1 =0<br />

> sol2:=solve(fbc1,bc2g,fK[1],_C1g);<br />

sol2 := f C1 = a<br />

2 ;K1<br />

p<br />

4 ¸2 ¡ a2 =<br />

g<br />

2<br />

Assigning sol2 ,weobtainYin the following form.<br />

> assign(sol2): Y:=Y;<br />

p r<br />

4 ¸2 ¡ a2 Y :=<br />

¡ ¸<br />

2<br />

2 ¡ 1<br />

4 a2 ¡ x2 + xa<br />

To determine ¸, the constraint condition R a<br />

G(y(x) =Y ) dx = L is imposed.<br />

0<br />

> eq2:=simplify(int(eval(G,y(x)=Y),x=0..a))=L;<br />

r<br />

¸<br />

eq2 := ¡<br />

2<br />

¡4 ¸2 + a2 p p<br />

¡4 ¸2 + a2 (¡ln(¡a + ¡4 ¸2 + a2 )<br />

+ln(a + p ¡4 ¸2 + a2 )) = L<br />

The values a =1andL =1:5 are entered, and eq2 numerically solved for ¸,<br />

the search range ¸ =0to0:6being speci¯ed.<br />

> a:=1: L:=1.5: lambda:=fsolve(eq2,lambda=0..0.6);<br />

¸ := 0:5014101096<br />

The ¯nal form of Y is then displayed, and jY j plotted in Figure 4.15.<br />

> Y:=Y; plot(abs(Y),x=0..a,scaling=constrained);<br />

Y := 0:03757789244 ¡ p 0:0014120980 ¡ x2 + x<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0.2 0.4 0.6 0.8 1<br />

x<br />

Figure 4.15: Shape of the oxhide strip that maximizes the enclosed area.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!