 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] solve function's behavior
| [MUG] solve function's behavior |
|
Author: Huy Cuong Nguyen
Posted: Wed, 6 Nov 2002 00:17:31 -0500
|
>> From: "Huy Cuong Nguyen" "nguyen06"
Hello,
I have to convert some Maple's code to C, but I met some problem to
convert the solve function.
Here is two functions I have to solve :
restart;
f:=cos(mm*Pi*(lambda1-lambda01)/lambda1*FF)+cos(mm*Pi*(lambda1-lambda01)/lambda1*FF)*(n1+constb/lambda1^2)^2/n^2-(-1)^mm*(n1+constb/lambda1^2)^2/n^2+(-1)^mm;
f2:=cos(mm1*Pi*(lambda2-lambda02)/lambda2*FF1)+cos(mm1*Pi*(lambda2-lambda02)/lambda2*FF1)*(n1+constb/lambda2^2)^2/n^2-(-1)^mm1*(n1+constb/lambda2^2)^2/n^2+(-1)^mm1;
The only variables for f is lambda1 and for f2 is lambda2. Here is values
of other parameters:
lambda01:=5347.4916;
lambda02:=5655.0244;
lambda03:=6000.4412;
FF := 1.081668343;
FF1 := 1.085724768;
n1:=1.593;
n:=.1;
mm:=17;
mm1:=16;
constb:=476000;
L1:=5394.0;
L2:=5692.1;
This is only a exemple, real values depend on rumtime.
Now if I type :
> solve(f=0, lambda1);
it will print 5642.194085 and
> solve(f2=0, lambda2);
5667.926754
but these functions have several solutions, it can be verified by plot
them:
plot(f, lambda1=5000..5900);
plot(f2, lambda2=5000..5900);
What I would like to know is WHY the solve function returns theses values
and not other.
Note: I have to know it because I have to use the Newton approximation to
solve theses equations in C program and the result depends closely on the
initially estimated value. I want to simulate the behavior of solve
function in C program.
Thanks.
-HCN-
|
Previous by date: [MUG] Maple 8 under Debian GNU/Linux - or, really, problems with
glibc2.3, Meik Hellmund
Next by date: [MUG] Can Maple krack this kernel?, NS Jones, Mathematics
Previous thread: [MUG] Macintosh OS X Command Line Maple 8, Bill Bauldry
Next thread: [MUG] Can Maple krack this kernel?, NS Jones, Mathematics
|
|
|