List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] evaluation algorithm for DE solutions
| [MUG] evaluation algorithm for DE solutions |
|
Author: Charles James Leonardo Quarra Cappiello
Posted: Tue, 3 Dec 2002 12:42:01 -0400
|
>> From: "Charles James Leonardo Quarra Cappiello" "charsquarra"
Hi,
The solution of this equation
>with(DEtools);
>DO:=(cos(x)*sin(x)/y(x))*diff( cos(x)*sin(x)*diff( y(x),x) ,x ) -
l^2*sin(x)^2 - m^2*cos(x)^2 = -k*(k+2)*cos(x)^2 * sin(x)^2;
is given as:
>SetSolutions:=dsolve( DO );
SetSolutions := y(x) = _C1 hypergeom(
2
[- m/2 + 1 + l/2 + k/2, - m/2 + l/2 - k/2], [1 + l], cos(x) )
l (- m/2) (- m/2)
cos(x) (cos(x) + 1) (cos(x) - 1) + _C2
hypergeom([- m/2 + 1 - l/2 + k/2, - m/2 - l/2 - k/2], [1 - l],
2 (-l) (- m/2) (- m/2)
cos(x) ) cos(x) (cos(x) + 1) (cos(x) - 1)
Now the questions is that i want to get a direct algorithm for the
evaluation of this solution, in particular the hypergeom part, but the naive
approach fails:
>with(CodeGeneration);
>C(_C1*hypergeom([-1/2*m+1+1/2*l+1/2*k,
-1/2*m+1/2*l-1/2*k],[1+l],cos(x)^2)*cos(x)^l*(cos(x)+1)^(-1/2*m)*(cos(x)-1)^(-1/2*m)+_C2*hypergeom([-1/2*m+1-1/2*l+1/2*k,
-1/2*m-1/2*l-1/2*k],[1-l],cos(x)^2)*cos(x)^(-l)*(cos(x)+1)^(-1/2*m)*(cos(x)-1)^(-1/2*m));
Any ideas how can i achieve this?
Greetings,
Charles Quarra
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
|
| [MUG] Re: evaluation algorithm for DE solutions |
|
Author: Stephen Forrest
Posted: Thu, 5 Dec 2002 18:15:45 -0500 (
|
>> From: Stephen Forrest "saforres"
On Tue, 3 Dec 2002, Charles James Leonardo Quarra Cappiello wrote:
[snip]
> Now the questions is that i want to get a direct algorithm for the
> evaluation of this solution, in particular the hypergeom part, but the naive
> approach fails:
>
> >with(CodeGeneration);
> >C(_C1*hypergeom([-1/2*m+1+1/2*l+1/2*k,
> -1/2*m+1/2*l-1/2*k],[1+l],cos(x)^2)*cos(x)^l*(cos(x)+1)^(-1/2*m)*(cos(x)-1)^(-1/2*m)+_C2*hypergeom([-1/2*m+1-1/2*l+1/2*k,
> -1/2*m-1/2*l-1/2*k],[1-l],cos(x)^2)*cos(x)^(-l)*(cos(x)+1)^(-1/2*m)*(cos(x)-1)^(-1/2*m));
>
> Any ideas how can i achieve this?
CodeGeneration[C] just translates your Maple expression to C in the
obvious way, sum to sum, function call to function call, etc. It won't
expand the hypergeom call or provide you with a C procedure to evaluate it.
You'll have to either find a way of converting your hypergeometric
function within Maple to something CodeGeneration can handle, or find
or write a C library to handle hypergeometric functions. Sometimes
convert(..., StandardFunctions) is helpful for the former: in this case,
it doesn't seem to be.
Steve
|
Previous by date: [MUG] bracket and multiple commands, A Prashanth Pg Ee
Next by date: [MUG] Re: Optimize tryhard, Maple User Group
Previous thread: [MUG] two bugs i found, A Prashanth Pg Ee
Next thread: [MUG] Optimize tryhard, Moore, Brian
|