       Functions and Packages

• To: mathgroup at smc.vnet.net
• Subject: [mg26873] Functions and Packages
• From: "Abel Toledano" <toledano11 at hotmail.com>
• Date: Fri, 26 Jan 2001 01:27:20 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hello.
I am using the package Calculus`VariationalMethods`,
to try to find the solutions of the functional:
J (y) =Integral[ f (x,y,y',y'',...)dx], a=< x =<b,
y(a)=a1, y(b)=b1, y'(a)=a2, y'(b)=b2, y''(a)=a3, y''(b)=b3,...

I have wrote this function:

Extremal[f_,{a_,b_},yy:{__List}]:=Module[{w=Length[yy]-1,q,s},
q=Table[Derivative[n][y]/@{a,b},{n,0,w}]//Flatten;
s=EulerEquations[f,y[x],x];
s=Prepend[q,s];
DSolve[s,y[x],x]]

To resolve the functional:
J(y)=Integral[(360 x^2 y-y''^2)dx],
0=< x =<1,y(0)=0,y(1)=0,y'(0)=0,y'(1)=5/2;
We do:
Extremal[360 x^2 y[x]-y''[x]^2,{0,1},{{0,0},{0,5/2}}]
We get : {{y[x]-> 1/2(2 x- 6 x^2 + 3 x^3 + x^6)}}, which is correct.

But, if I put this function inside a Package, like that:

BeginPackage["Extremal`"]
Extremal;
Begin["`Private`"]
Needs["Calculus`VariationalMethods`"]
Extremal[...]:=Module[{},...]
End[]
EndPackage[]

Then is NOT working. Why?

Thanks
Abel

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

```

• Prev by Date: Re: Factor[1+x^4]
• Next by Date: Re: Overriding Power
• Previous by thread: Re: How can I creat a user coordinate system for my routine?
• Next by thread: Re: Functions and Packages