List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] solve
| [MUG] solve |
|
Author: Ruth Plathe
Posted: 09/10/2000 13:06:01 GDT
|
>> From: "Ruth Plathe"
I have 4 equations:
> level0:=(-In*sigma02*N0)+(N2/tau2)+(N5/tau5)+(N6/tau6)+((1/2)*k*N2^2
> )=0; level2:=(In*sigma02*N0)-(N2/tau2)-(In*sigma25*N2)-k*N2^2=0;
> level5:=(In*sigma25*N2)-N5/tau5-(In*sigma56*N5)+((1/2)*k*N2^2)=0;
> level6:=(In*sigma56*N5)-(N6/tau6)=0;
With the following constants
> sigma02:=10*10^(-21);
> sigma25:=2*10^(-21);
> sigma56:=2*10^(-21);
> tau2:=2.5*10^(-3);
> tau5:=1*10^(-3);
> tau6:=0.72*10^(-3);
> k:=0.4*10^(-18);
I wish to get expressions for N0,N2,N5,N6 in terms of In
This appears to be impossible - I get all sorts of recursion errors or
it just gives me N2=N2 which is pretty useless. Does anyone have any
tips on how to solve this?
Ruth Plathe
Postgraduate Research Student
Centre for Imaging and Applied Optics,
Swinburne University
Ph: 9214 5680 (office)
9214 5686 (lab)
Fax: 9214 5840
|
| [MUG] when does maple 'give up' during a solve? |
|
Author: Tlovie
Posted: 12/10/2000 19:03:50 GDT
|
>> From:
I have a maple worksheet that involves solving a system of non-linear
polynomial equations. Maple attempts to find the closed form solution to
these equations, but never arrives at a solution before using all of my
128MB of ram. My question is, since maple hasn't stopped the computation
on it's own accord, is it actually making progress at finding a
solution(s), or is it likely that no matter how much memory I make
available, it will never stop the computation?
The equations I'm trying to solve are here, in case any insights can be
had from looking at them.
S:=matrix([[1,-s1,-s2],[-s1,1,-s3],[-s2,-s3,1]]);
C:=matrix([[c11,c12,c13],[c12,1,c23],[c13,c23,c33]]);
R:=collect(linalg[det](evalm(lambda^2*matrix([[1,0,0],[0,1,0],[0,0,1]])+
lambda*C+S)),lambda);
T:=expand((lambda+(linalg[det](S))^(1/6))^6);
eq1:=coeff(R,lambda,1)=coeff(T,lambda,1);
eq2:=coeff(R,lambda,2)=coeff(T,lambda,2);
eq3:=coeff(R,lambda,3)=coeff(T,lambda,3);
eq4:=coeff(R,lambda,4)=coeff(T,lambda,4);
eq5:=coeff(R,lambda,5)=coeff(T,lambda,5);
solve({eq1,eq2,eq3,eq4,eq5},{c11,c12,c13,c23,c33});
Any comments would be appreciated.
Tom Lovie.
|
| [MUG] Re: solve |
|
Author: Maple Group
Posted: 13/10/2000 16:17:18 GDT
|
>> From: Maple Group
| >> From: "Ruth Plathe"
|
| I have 4 equations:
|
| > level0:=(-In*sigma02*N0)+(N2/tau2)+(N5/tau5)+(N6/tau6)+((1/2)*k*N2^2
| > )=0; level2:=(In*sigma02*N0)-(N2/tau2)-(In*sigma25*N2)-k*N2^2=0;
| > level5:=(In*sigma25*N2)-N5/tau5-(In*sigma56*N5)+((1/2)*k*N2^2)=0;
| > level6:=(In*sigma56*N5)-(N6/tau6)=0;
|
| With the following constants
|
| > sigma02:=10*10^(-21);
| > sigma25:=2*10^(-21);
| > sigma56:=2*10^(-21);
| > tau2:=2.5*10^(-3);
| > tau5:=1*10^(-3);
| > tau6:=0.72*10^(-3);
| > k:=0.4*10^(-18);
|
| I wish to get expressions for N0,N2,N5,N6 in terms of In
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Gaston Gonnet
Date: Tue, 10 Oct 2000 15:19:15 +0200 (MET DST)
To:
Subject: solve
Your system is indeterminate in one of the N variables. If you
solve it with exact constants (instead of floating point numbers)
you get
N2 (200000000000000000000000 + In + 200 N2)
{N2 = N2, N0 = 1/5 -------------------------------------------,
In
In N2 (In + 100 N2)
N6 = 9/6250000000000000000000000 -----------------------------,
500000000000000000000000 + In
N2 (In + 100 N2)
N5 = -----------------------------}
500000000000000000000000 + In
which means that for any arbitrary value of N2 there is a solution.
Gaston Gonnet.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Stanley J Houghton
Date: Tue, 10 Oct 2000 14:49:59 +0100
To:
Subject: solve
Ruth
Unfortunately, your four equations are only three! If you add the
first three they equal the level 6 equation. Thus you can only solve
for three variables and hence the N2=N2 result.
Hope it helps
Stan
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 10 Oct 2000 17:28:37 +0100
From: "Dr Francis J. Wright"
To:
Subject: solve
It is impossible because your equations are not independent. The values
of the constants are largely irrelevant, although the disparity in their
values would make me very worried about numerical instability if I had
to do a numerical solution. Here is some analysis using Maple 6. I set
up the equations as above, but not the constants. Then
> ii := 0,2,5,6: solve({level||ii},{N||ii});
N2 (1 + In sigma25 tau2 + k N2 tau2)
{N0 = ------------------------------------,
In sigma02 tau2
N2 tau5 (2 In sigma25 + k N2)
N5 = 1/2 -----------------------------,
1 + In sigma56 tau5
In sigma56 N2 tau5 (2 In sigma25 + k N2) tau6
N6 = 1/2 ---------------------------------------------,
1 + In sigma56 tau5
N2 = N2}
This implies that the equations are not independent, which is easily
confirmed by hand:
> level0 := level0+level6; # eliminate N6
level0 :=
N2 N5 2
-In sigma02 N0 + ---- + ---- + 1/2 k N2 + In sigma56 N5 = 0
tau2 tau5
> level0 := level0+level2; # eliminate N0
N5 2
level0 := ---- - 1/2 k N2 + In sigma56 N5 - In sigma25 N2 = 0
tau5
> level0+level5; # not independent!
0 = 0
The best you can get is a 2-parameter family of solutions. In the light
of this, I suggest you need to reconsider the model that led you to try
to solve these equations.
Francis
--
Dr Francis J. Wright | mailto:
School of Mathematical Sciences | tel: (020) 7882 5453 (direct)
Queen Mary, University of London | fax: (020) 8981 9587 (dept.)
Mile End Road, London E1 4NS, UK | http://centaur.maths.qmw.ac.uk/
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 10 Oct 2000 10:06:32 -0700 (PDT)
From: Robert Israel
To:
Subject: solve
Maple (Release 6.1) quickly gives me the following:
> solve({level0,level2,level5,level6},{N0,N2,N5,N6});
24
N2 (.2000000000 10 + In + 200. N2)
{N0 = .2000000000 ------------------------------------,
In
-23 In N2 (In + 100. N2)
N6 = .1440000000 10 ---------------------,
24
.5000000000 10 + In
N2 (In + 100. N2)
N5 = ---------------------, N2 = N2}
24
.5000000000 10 + In
N2=N2 is not "pretty useless", it's telling you an important fact:
your four equations do not have a unique solution, and the variable N2 can
be taken as arbitrary. In fact, you might note that one of your equations
is redundant, as the sum of the equations is 0=0.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 11 Oct 2000 10:03:30 +1000
To:
From: (Bill Whiten)
Subject: solve
The equations are not independent. level0 can be obtained from the other
equations.
Using Maple Vr5.1:
level0:=(-In*sigma02*N0)+(N2/tau2)+(N5/tau5)+(N6/tau6)+((1/2)*k*N2^2);
level2:=(In*sigma02*N0)-(N2/tau2)-(In*sigma25*N2)-k*N2^2;
level5:=(In*sigma25*N2)-N5/tau5-(In*sigma56*N5)+((1/2)*k*N2^2);
level6:=(In*sigma56*N5)-(N6/tau6);
subs(N6=solve(level6,N6),N5=solve(level5,N5),N0=solve(level2,N0),level0);
simplify(%);
0
Regards,
-----------
Bill Whiten,
Julius Kruttschnitt Mineral Research Centre,
The University Of Queensland, Tel: int +61 7 3365 5888
Isles Rd, Indooroopilly, Fax: int +61 7 3365 5999
Brisbane Qld 4068, AUSTRALIA.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 11 Oct 2000 02:13:52 +0200
From: Helmut Kahovec
To:
Subject: solve
Hello Ruth,
Well, I suggest the following approach to solve your equations:
> solve(
> {seq(cat(level,i),i=[0,2,5,6])},
> {seq(cat(N,i),i=[0,2,5,6])}
> );
The last result is NULL. Thus solve() did not succeed. However, since
your equations are homogeneous in the N-variables we can convert them
into a linear system of equations for the variables x0=N0/N2, x2=N2,
x5=N5/N2, and x6=N6/N2:
> map(expand@eval,[seq(cat(level,i)/N2,i=[0,2,5,6])]);
> eqns:=op(subs({N0=x0*N2,N5=x5*N2,N6=x6*N2},N2=x2,%));
> vars:=seq(cat(x,i),i=[0,2,5,6]);
The matrix A of the linear system is
> A:=linalg[genmatrix]({eqns},[vars],'b');
[ 1 ]
[ 0 0 In sigma56 - ----]
[ tau6]
[ ]
[ 1 1 ]
[-In sigma02 1/2 k ---- ---- ]
A := [ tau5 tau6 ]
[ ]
[In sigma02 -k 0 0 ]
[ ]
[ 1 ]
[ 0 1/2 k - ---- - In sigma56 0 ]
[ tau5 ]
with the right-hand side b
> eval(b);
[ 1 1 ]
[0, - ----, ---- + In sigma25, -In sigma25]
[ tau2 tau2 ]
and the rank
> linalg[rank](A);
3
The rank of A is less than 4, which probably is the reason why solve()
has not been able to do its job. Now we solve the linear system for x0,
x2, x5, and x6
> linalg[linsolve](A,b,'r',t);
and convert the solution into a list:
> convert(%,list);
[- (-2 tau2 t[1] - 2 tau2 t[1] In sigma56 tau5 - tau5
+ tau2 In sigma25 tau5)/(tau5 In sigma02 tau2),
-t[1] - t[1] In sigma56 tau5 + In sigma25 tau5
-2 ----------------------------------------------, t[1],
k tau5
In sigma56 t[1] tau6]
Since x2=N2 we have:
> N2=op(2,%);
-t[1] - t[1] In sigma56 tau5 + In sigma25 tau5
N2 = -2 ----------------------------------------------
k tau5
Rewriting the solutions in terms of N0, N2, N5, and N6 again yields
> subs(%,applyop(u->u*N2,{1,3,4},%%));
> sols:={op(zip((u,v)->u=v,[seq(cat('N',i),i=[0,2,5,6])],%))};
%1
sols := {N2 = -2 ------, N0 = 2 ((-2 tau2 t[1]
k tau5
- 2 tau2 t[1] In sigma56 tau5 - tau5 + tau2 In sigma25 tau5)
2 t[1] %1
%1)/(tau5 In sigma02 tau2 k), N5 = -2 -------,
k tau5
In sigma56 t[1] tau6 %1
N6 = -2 -----------------------}
k tau5
%1 := -t[1] - t[1] In sigma56 tau5 + In sigma25 tau5
These solutions do indeed satisfy the original equations:
> simplify(subs(sols,eval([seq(cat('level',i),i=[0,2,5,6])])));
[0 = 0, 0 = 0, 0 = 0, 0 = 0]
Finally, we introduce the parameters as equations (relations)
> params:=
> sigma02=10*10^(-21),
> sigma25=2*10^(-21),
> sigma56=2*10^(-21),
> tau2=2.5*10^(-3),
> tau5=1*10^(-3),
> tau6=0.72*10^(-3),
> k=0.4*10^(-18);
and get the desired numerical values of N0, N2, N5, and N6 in terms of
the parameter In:
> map(
> print@(u->collect(u,t[1]))@expand,
> normal(subs({params},sols),expanded)
> ):
22
N2 = (.5000000000 10 + .01000000000 In) t[1] - .01000000000 In
/ 46 1 22 \
N0 = |.1000000000 10 ---- + .4000000000 10 + .004000000000 In|
\ In /
2
t[1] +
/ 45 \
| .2000000000 10 22|
|-.006000000000 In + ---------------- - .2600000000 10 |
\ In /
21
t[1] - .4000000000 10 + .002000000000 In
22 2
N5 = (.5000000000 10 + .01000000000 In) t[1]
- .01000000000 t[1] In
-25 2 2
N6 = (.007200000000 In + .1440000000 10 In ) t[1]
-25 2
- .1440000000 10 t[1] In
t[1] is an arbitrary parameter introduced by the fact that the rank of
the matrix A is less than 4. Thus we get an infinite number of solutions
for N0, N2, N5, and N6.
With kind regards,
Helmut
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 11 Oct 2000 16:50:46 +0100
From: Barsuhn
Subject: solve
To:
Dear Ruth,
I inserted three statements into the code you supplied. The first
defining a variable eqsys for your system of equations, the seconds
allows you to inspect your equation system after specifying various
constants. The third is the solve-statement.
> eqsys:={level0,level2,level5,level6};
> eqsys;
> solve(eqsys,{N0,N2,N5,N6});
I obtain N2=N2, too. This shows that your four equations are not
independent and thus not sufficient to solve uniquely for N0,N2,N5,N6.
You could choose an arbitrary N2 and in any case would obtain a solution
of your system of four equations.
You can check this by substituting the solutions found into your system
of equations.
>subs(%,eqsys);simplify(%);
Don't worry that simplify ends up with the set {0.=0}, i.e. with only
one identity. The other three identities have been erased as a set
consists only of different elements.
Probably you should look for a further equation for your variables.
All the best Jurgen
--
-------------------
Prof. Dr. Jurgen Barsuhn
Fachhochschule Bielefeld
University of Applied Sciences
Fachbereich Elektrotechnik und Informationstechnik
Wilhelm-Bertelsmann-Str. 10
D-33602 Bielefeld
-----------
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 12 Oct 2000 14:20:37 -0400 (EDT)
From: Robert K Wright
To:
Subject: solve
> solset:= solve({level0,level2,level5,level6},{N0,N2,N5,N6});
24
N2 (.2000000000 10 + In + 200. N2)
solset := {N0 = .2000000000 ------------------------------------,
In
N2 (In + 100. N2)
N5 = ---------------------,
24
.5000000000 10 + In
-23 In N2 (In + 100. N2)
N6 = .1440000000 10 ---------------------, N2 = N2}
24
.5000000000 10 + In
> #Note N0,N5,N6 come out in terms of N2 and In. So apparently
> #the four equations you give are not independent, and have
> #a 1-parameter family of solutions.
> #Below, substitute into the system of equations
> #to check that they are really solved:
> subs(solset,{level0,level2,level5,level6});
-20 24
{.2000000000 10 N2 (.2000000000 10 + In + 200. N2)
- 400.0000000 N2 - 1/500000000000000000000 In N2
-18 2
- .4000000000 10 N2 = 0,
-20 24
-.2000000000 10 N2 (.2000000000 10 + In + 200. N2)
N2 (In + 100. N2)
+ 400.0000000 N2 + 1000 ---------------------
24
.5000000000 10 + In
-20 In N2 (In + 100. N2)
+ .2000000000 10 ---------------------
24
.5000000000 10 + In
-18 2
+ .2000000000 10 N2 = 0, 1/500000000000000000000 In N2
N2 (In + 100. N2)
- 1000 ---------------------
24
.5000000000 10 + In
In N2 (In + 100. N2)
- 1/500000000000000000000 ---------------------
24
.5000000000 10 + In
-18 2
+ .2000000000 10 N2 = 0, 0 = 0}
> simplify(%);
{0 = 0}
>
************************
R. K. Wright Math/Stat Department
802-656-3429 University of Vermont
|
| [MUG] fsolve and dsolve,numeric |
|
Author: Douglas B Meade
Posted: 17/10/2000 22:13:02 GDT
|
>> From: "Douglas B. Meade"
Dear MUG,
A few weeks ago I posted a question about using the results from numeric
dsolve in fsolve. I sent the same request to Maple Support. It took a
few iterations, but they did provide a very nice solution to my problem.
The full message from Technical Support is attached below. The basic
idea is to use the usual wrapper to avoid evaluation of the solution for
non-numeric arguments. The key is to use the method=taylorseries option
to numeric dsolve to coerce Maple into returning a result that is
compatible with fsolve. With this modification, all seems to work well
-- at least on this type of problem.
Doug
-------- Original Message --------
Subject: Incident=334494 fsolve help
Date: Mon, 18 Sep 2000 17:45:41 -0400
From: George Terlecki
To:
CC:
Dear Dr. Meade,
I was able to confirmed that this bug was fixed and the fix will be
probably
available in next full release of Maple.
I have also a workaround presented below.
> ff := dsolve({diff(x(t),t)=x(t),x(0)=2},
{x(t)}, type=numeric, output=listprocedure, method=taylorseries):
> fx0 := subs(ff,x(t));
fx0 := proc(t) ... end proc
# This next procedure allows for an unevaluated return, which is necc.
for
fsolve with dsolve/numeric
> fx := proc(x)
if not type(evalf(x),`numeric`) then
'procname'(x);
else
fx0(x);
fi;
end:
> fx(0);
2.
> fx(1);
5.436563657
> fsolve(fx(x)=3,x=0.1..1);
.4054651078
> fsolve(fx(x)=4,x=0.1..1);
.6931471800
Please let me know if you have any further questions with regards to
this
matter.
Best Regards,
George Terlecki
Technical Support Analyst
|
| [MUG] Re: when does maple give up during a solve? |
|
Author: Maple Group
Posted: 18/10/2000 22:58:48 GDT
|
>> From: Maple Group
>> From:
| I have a maple worksheet that involves solving a system of non-linear
| polynomial equations. Maple attempts to find the closed form solution to
| these equations, but never arrives at a solution before using all of my
| 128MB of ram. My question is, since maple hasn't stopped the computation
| on it's own accord, is it actually making progress at finding a
| solution(s), or is it likely that no matter how much memory I make
| available, it will never stop the computation?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Jason Schattman
To:
Subject: when does maple 'give up' during a solve?
Date: Fri, 13 Oct 2000 11:46:43 -0400
It looks like the equations you're solving are of degree 6, and I believe there
is, in general, no closed form formula for roots of polynomials (or systems
thereof) higher than degree 4.
You may need to use fsolve(), which looks for numerical solutions rather than
symbolic ones.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Sat, 14 Oct 2000 09:56:23 -0700 (PDT)
From: "Jason C. Leach"
To:
Subject: when does maple 'give up' during a solve?
hi,
Have a look at:
?startup
?kernelops
With them you can set some options like, I think, CPU and Mem usage. If
you are on a Unix system, you can do this do your proces also.
j.
......................
..... Jason C. Leach
... University College of the Cariboo.
..
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Venkatramanan, Subramanian"
To:
Subject: when does maple 'give up' during a solve?
Date: Sat, 14 Oct 2000 16:28:40 -0400
You can add your virtual memory by adding let's say 1GB of your C or D
drive. I have had experiences with Maple taking more than 128 MB to solve,
especially if its in symbolic form. But, it looks like your set of equations
may not have exact solution. You probably want to try numerical solution.
Venkat
Venkat R. Subramanian
Ph.D. Candidate
Center for Electrochemical Engineering
Department of Chemical Engineering
University of South Carolina
Office: (803) 576 5634
Home: (803) 254 6255
http://www.engr.sc.edu/grad/venkatra
"It sure makes the day long when you get to work on time".
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Colin J Christopher"
To:
Date: Mon, 16 Oct 2000 13:08:49 GMT
Subject: when does maple 'give up' during a solve?
If there is no solution then Maple sometimes returns nothing,
which is a bit disconcerting. However, there should
be a solution here. I took u^6 = det(S) as a 6th
equation, and substituted u instead of det(S)^(1/6)
in the equations - otherwise the equations are just
too complicated for Maple to solve if they involve 6th roots
The new equations are now just polynomials. Solve returned nothing
(it did terminate though). I then tried a grobner basis
calculation, but run out of memory or something.
The real problem is probably that it is best to work
with the matrices themselves rather than get maple
to work with the coefficients since there seems to
be a large number of equations that way, and makes
things too hard for Maple to deal with. also you miss
out on any symmetry present.
If the matrices are real then (since they are symmetric)
you can find roots etc (I.e. let S = U^6) and factorize the quadratic
in lambda in R by completing the square. R then
becomes a product of two determinants of the form det(lam*Id + A_i)
and T becomes (lam + det(U))^6. So, A_i have all
their eigenvalues = det(U) and so must be of the form det(U)*Id.
The only solutions therefore are C=2*det(U)*Id, D=det(U)^2*Id.
Regards, Colin
--------------------------------------------
Colin Christopher,
Department of Mathematics and Statistics,
University of Plymouth,
Plymouth PL2 3AJ, UK.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Mon, 16 Oct 2000 11:18:46 -0700 (PDT)
From: Robert Israel
To:
Subject: when does maple 'give up' during a solve?
Your equations, converted into a polynomial system, are quite complicated.
For example, equation 1 alone (after taking the 6th power of both sides,
and subtracting one side from the other) becomes an irreducible polynomial
of 10933 terms, of degree 12 in each of the s's and 6 in each of the c's.
And in the course of the solution process, the amount of complication
tends to rise enormously. In principle, "solve" should terminate in a
finite amount of time after using a finite amount of memory. However, I
would bet that these finite amounts would be astronomically large. Even
with all the memory available in the world, don't expect to get an answer
in this life.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
|
| [MUG] slow series(solve(..)) quirk in Maple VI, V.X>3 |
|
Author: Desmond Johnston
Posted: 20/10/2000 15:24:28 GDT
|
>> From: Desmond Johnston
The following command:
z:=series(solve((c2-1)*g*(3*(c2-1)*z-1)**2-z+(c2*z-3*c2*(c2-1)**2*z**3)*(3*(c2-1
)*z-1)**2=0,z),g=0,40+1);
for reverting a power series of an implicitly defined function- runs ten
times faster or more on similar equipment with MapleV.3 compared with
later versions. The rot sets in when the order in g reaches 30+1 or so.
(The answer for Maple V.3 agrees with later versions).
Playing around with stacklimit and gcfreq doesn't speed things
up for V.X>3 or VI.
Can anyone enlighten me as to what is going on, and how it might be
avoided?
Des Johnston
Maths Department
Heriot-Watt University
Edinburgh
|
| [MUG] dsolve numeric and analytic solution |
|
Author: CT
Posted: 27/10/2000 11:01:51 GDT
|
>> From: CT
Hello,
We have solve a differential equation with "dsolve numeric" and we
think that our solution could be approximate by a function (1/x^3 when
x-> infinite). Do you know maple's functions doing such a kind of
comparison ?
Thank you for your help, Christine
Universite Louis Pasteur. Strasbourg
|
| [MUG] How to solve this equation by Maple? |
|
Author: Meiers, Jerald
Posted: 31/10/2000 13:41:03 GMT
|
>> From: "Meiers, Jerald"
What are the steps (or is it really possible?) to arrive at the solution
"theta = 2*lambda" for the following equation of unknown 'theta',
by Maple?
eqn:=tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta) = 0;
(Of course, we need to suppose we don't know the solution beforehand.)
Thanks.
|
| [MUG] Re: dsolve numeric and analytic solution |
|
Author: Maple Group
Posted: 03/11/2000 13:34:08 GMT
|
>> From: Maple Group
>
>>> From: CT
>
> We have solve a differential equation with "dsolve numeric" and we
>think that our solution could be approximate by a function (1/x^3 when
>x-> infinite). Do you know maple's functions doing such a kind of
>comparison ?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Chris Eilbeck
Date: Tue, 31 Oct 2000 11:08:54 GMT
To:
Subject: dsolve numeric and analytic solution
try sticking in an inverse power series
y = a[1]/x+a[2]/x^2 +a[3]/x^3 + ...
into the differential equation and trying solving for the coefficients.
It's a common technique in mathematics, most books on o.d.e.'s will have
a chapter on this.
----------------------------------------------------------------------
Chris Eilbeck email:
Department of Mathematics, Fax: +44 (0)131 451 3249
Heriot-Watt University, Phone: +44 (0)131 451 3220
Edinburgh EH14 4AS, Scotland. WWW: http://www.ma.hw.ac.uk/~chris/
----------------------------------------------------------------------
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Willard, Daniel Dr DUSA-OR"
To:
Subject: dsolve numeric and analytic solution
Date: Tue, 31 Oct 2000 08:03:21 -0500
Try: > limit(1/x^3-[your solution], x=infinity);
|
| [MUG] Re: How to solve this equation by Maple? |
|
Author: Maple Group
Posted: 03/11/2000 13:35:43 GMT
|
>> From: Maple Group
> >> From: "Meiers, Jerald"
>
> What are the steps (or is it really possible?) to arrive at the solution
> "theta = 2*lambda" for the following equation of unknown 'theta',
> by Maple?
>
> eqn:=tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta) = 0;
>
> (Of course, we need to suppose we don't know the solution beforehand.)
>
> Thanks.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 01 Nov 2000 18:21:18 +0100
From: Adri van der Meer
To:
Subject: How to solve this equation by Maple?
> s := solve(eqn,theta):
> convert(combine(simplify(convert(s,sincos))),tan);
arctan(tan(2 lambda))
and, of course only
> simplify(%,symbolic);
gives the desired answer.
--
A. van der Meer
Dept. Applied Mathematics
University of Twente Phone +31 (53) 4893427
P.O. Box 217 Fax +31 (53) 4894824
7500 AE Enschede
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 2 Nov 2000 03:01:22 -0500 (EST)
From: Carl DeVore
To:
Subject: How to solve this equation by Maple?
The trick is to use differentiation to verify that the complicated trig
expression can be reduced in ways that Maple apparently does not know
about. Here it is explicitly:
> f:= (lambda,theta) ->
tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta):
> solve(f(lambda,theta)=0,theta);
tan(lambda)
-arctan(2 ----------------)
2
tan(lambda) - 1
> simplify(diff(%,lambda));
2
> ans:= dsolve(diff(theta(lambda),lambda)=%);
ans := theta(lambda) = 2 lambda + _C1
> solve(f(lambda,rhs(ans))=0);
{_C1 = 0, lambda = lambda}
Therefore, the integration constant is 0, and thus the answer is
theta = 2 * lambda.
Carl Devore
University of Delaware
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 02 Nov 2000 09:43:42 +0100 (CET)
From:
To:
Subject: How to solve this equation by Maple?
With
> solve( { convert(eqn, exp ) }, theta );
you get
{theta = 2*lambda}
E. Elbraechter
----------------------------------
E-Mail:
Date: 02-Nov-2000
Time: 09:38:00
----------------------------------
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 02 Nov 2000 13:24:46 +0000
From: "Dr Francis J. Wright"
To:
Subject: How to solve this equation by Maple?
The following (using Maple 6) is a bit tortuous because combine seems to
work only on the sincos form and not on the tan form, thereby requiring
conversion to and from sincos form. Otherwise, it would be fairly
straightforward.
> eqn:=tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta);
2
eqn := tan(lambda) sin(theta) + 2 tan(lambda) cos(theta)
- sin(theta)
> solve(eqn, theta);
tan(lambda)
-arctan(2 ----------------)
2
tan(lambda) - 1
> convert(%, sincos);
sin(lambda)
-arctan(2 ------------------------------)
/ 2 \
|sin(lambda) |
cos(lambda) |------------ - 1|
| 2 |
\cos(lambda) /
> simplify(%);
sin(lambda) cos(lambda)
arctan(2 -----------------------)
2
2 cos(lambda) - 1
> combine(%, trig);
sin(2 lambda)
arctan(-------------)
cos(2 lambda)
> convert(%, tan);
arctan(tan(2 lambda))
> simplify(%, symbolic);
2 lambda
Francis
--
Dr Francis J. Wright | mailto:
School of Mathematical Sciences | tel: (020) 7882 5453 (direct)
Queen Mary, University of London | fax: (020) 8981 9587 (dept.)
Mile End Road, London E1 4NS, UK | http://centaur.maths.qmw.ac.uk/
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 2 Nov 2000 10:48:05 -0600 (CST)
From: Andrzej Pindor
To:
Subject: How to solve this equation by Maple?
|\^/| Maple 6 (SUN SPARC SOLARIS)
._|\| |/|_. Copyright (c) 2000 by Waterloo Maple Inc.
\ MAPLE / All rights reserved. Maple is a registered trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> leqn:=tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta);
2
leqn := tan(lambda) sin(theta) + 2 tan(lambda) cos(theta) - sin(theta)
> cleqn:=convert(leqn,tan);
cleqn :=
2
tan(lambda) tan(1/2 theta) tan(lambda) (1 - %1) tan(1/2 theta)
2 --------------------------- + 2 -------------------- - 2 --------------
1 + %1 1 + %1 1 + %1
2
%1 := tan(1/2 theta)
> subs(tan(1/2*theta)=y,cleqn);
2 2
tan(lambda) y tan(lambda) (1 - y ) y
2 -------------- + 2 -------------------- - 2 ------
2 2 2
1 + y 1 + y 1 + y
> solve(%=0,y);
1
tan(lambda), - -----------
tan(lambda)
> solve(tan(1/2*theta)=tan(lambda),theta);
bytes used=1000700, alloc=851812, time=0.31
2 lambda
> solve(tan(1/2*theta)=-1/tan(lambda),theta);
1
-2 arctan(-----------)
tan(lambda)
Regards
Andrzej
--
Dr. Andrzej Pindor The foolish reject what they see and not what
University of Toronto think; the wise reject what they think and not
Information Commons what they see. Huang Po
Phone: (416) 978-5045 Fax: (416) 978-7705
|
| [MUG] Re: How to solve this equation by Maple? |
|
Author: Maple Group
Posted: 07/11/2000 14:41:40 GMT
|
>> From: Maple Group
| >> From: "Meiers, Jerald"
|
| What are the steps (or is it really possible?) to arrive at the solution
| "theta = 2*lambda" for the following equation of unknown 'theta',
| by Maple?
|
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "peter lindsay"
To:
Subject: How to solve this equation by Maple?
Date: Sat, 4 Nov 2000 12:20:26 -0000
tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta)
can be simplified to (sec(lambda))^2 * sin(2*lambda-theta); after that the
solution is easy.
I dont know how to simplify
tan(lambda)^2*sin(theta)+2*tan(lambda)*cos(theta)-sin(theta)
in maple.
Peter Lindsay
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Sat, 4 Nov 2000 19:38:34 -0500 (EST)
From: David Vaughan
To:
Subject: How to solve this equation by Maple?
The solution depends on what domains for lambda and theta are chosen. For
example, if theta is any value that makes sine 0 then lambda is anything
that makes tangent 0. If we assume these kinds of cases have been dealt
with, then use the quadratic formula to solve for tangent(lambda) in terms
of functions of theta, and some identities to get the result. No calculus
is required.
DCVaughan
Department of Mathematics
Wilfrid Laurier University
|
| [MUG] solve |
|
Author: Bill Moss
Posted: Thu, 07 Feb 2002 13:37:23 -0500
|
>> From: Bill Moss />
This worked in Maple 6
> eqn1 := c1*cos(1/2*(k/m)^(1/2)*L/V)-c2*sin(1/2*(k/m)^(1/2)*L/V) = 0;
> eqn2 :=
c1*sin(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)+c2*cos(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)-k*L/(m*Pi^2*V^2-k*L^2)*Pi*V
= 0;
> solve({eqn1,eqn2},{c1,c2});
but does not in Maple 7. The output is null.
Bill Moss
Professor Mathematical Sciences
Clemson University
Clemson, SC 29634-0975
864.656.5225
http://www.math.clemson.edu/~bmoss
|
| [MUG] Re: solve |
|
Author: Carl Devore
Posted: Wed, 13 Feb 2002 15:27:29 -0500
|
>> From: Carl Devore />
On Thu, 7 Feb 2002, Bill Moss wrote:
> This worked in Maple 6
> > eqn1 := c1*cos(1/2*(k/m)^(1/2)*L/V)-c2*sin(1/2*(k/m)^(1/2)*L/V) = 0;
> > eqn2 :=
> c1*sin(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)+c2*cos(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)-k*L/(m*Pi^2*V^2-k*L^2)*Pi*V
> = 0;
> > solve({eqn1,eqn2},{c1,c2});
> but does not in Maple 7. The output is null.
You should "declare" all the variables for solve for your first attempt:
> solve({eq1,eq2}, {c1,c2,k,L,V,M})
or
> solve({eq1, eq2}, indets({eq1, eq2}, And(name, Not(constant))));
...and then prune away the unneeded variables.
You probably suspected that whatever solution there was would be true for
all k, L, V, m. But in fact there are some weird solutions that fix the
value of k and give a c1 that is not 0 and does not depend on k.
|
| [MUG] Re: solve |
|
Author: Maple User Group
Posted: Thu, 21 Feb 2002 09:30:26 -0500
|
>> From: Maple User Group />
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 20 Feb 2002 17:06:36 +0100
From: Preben Alsholm />
To: />
Subject: solve
The problem does seem to be a genuine bug in solve. Take a look at the following simplified examples:
restart;
> eqn1 := c1*cos(w)-c2*sin(w) = 0:
> eqn2 := c1*sin(w)*sqrt(b)+c2*cos(w)*sqrt(b)-a= 0:
> solve({eqn1,eqn2},{c1,c2});#No answer
>
> restart;
> eqn1 := c1*cos(w)-c2*sin(w) = 0:
> eqn2 := c1*sin(w)*b+c2*cos(w)*b-a= 0:
> solve({eqn1,eqn2},{c1,c2});
>
a cos(w) a sin(w)
{c2 = --------, c1 = --------}
b b
> restart;
> eqn1 := c1*cw-c2*sw = 0:
> eqn2 := c1*sin(w)*sqrt(b)+c2*cos(w)*sqrt(b)-a= 0:
> solve({eqn1,eqn2},{c1,c2}); #No answer
>
> restart;
> eqn1 := c1*cw-c2*sw = 0:
> eqn2 := c1*sin(w)*sqrt(2)+c2*cos(w)*sqrt(2)-a= 0:
> solve({eqn1,eqn2},{c1,c2});
>
1/2 1/2
a 2 sw a cw 2
{c1 = 1/2 ---------------------, c2 = 1/2 ---------------------}
sin(w) sw + cos(w) cw sin(w) sw + cos(w) cw
> restart;
> eqn1 := c1*cw-c2*sw = 0:
> eqn2 := c1*sw*sqrt(b)+c2*cw*sqrt(b)-a= 0:
> solve({eqn1,eqn2},{c1,c2});
a cw a sw
{c2 = ----------------, c1 = ----------------}
1/2 2 2 1/2 2 2
b (sw + cw ) b (sw + cw )
The combination of sin and cos with sqrt of a symbolic b in one of the two equations seems to have a bad
effect.
--
Preben Alsholm
Institut for matematik (Department of Mathematics)
DTU (Technical University of Denmark)
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Willard, Daniel Dr DUSA-OR" />
To: />
Subject: solve
Date: Wed, 20 Feb 2002 11:29:26 -0500
It works, of course, in V 5.1.
-----Original Message-----
From: Carl Devore />
Sent: Wednesday, February 13, 2002 3:27 PM
To: />
Subject: [MUG] Re: solve
>> From: Carl Devore />
On Thu, 7 Feb 2002, Bill Moss wrote:
> This worked in Maple 6
> > eqn1 := c1*cos(1/2*(k/m)^(1/2)*L/V)-c2*sin(1/2*(k/m)^(1/2)*L/V) = 0;
> > eqn2 :=
>
c1*sin(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)+c2*cos(1/2*(k/m)^(1/2)*L/V)*sqrt(k/m)-
k*L/(m*Pi^2*V^2-k*L^2)*Pi*V
> = 0;
> > solve({eqn1,eqn2},{c1,c2});
> but does not in Maple 7. The output is null.
You should "declare" all the variables for solve for your first attempt:
> solve({eq1,eq2}, {c1,c2,k,L,V,M})
or
> solve({eq1, eq2}, indets({eq1, eq2}, And(name, Not(constant))));
...and then prune away the unneeded variables.
You probably suspected that whatever solution there was would be true for
all k, L, V, m. But in fact there are some weird solutions that fix the
value of k and give a c1 that is not 0 and does not depend on k.
|
Previous by date: [MUG] experimental linear algebra using Maple 6, Jonathan Golan
Next by date: [MUG] Maple V release 4.0 questions, Ta Quang Son
Previous thread: [MUG] 3dplot help., Jason C Leach
Next thread: [MUG] Maple V release 4.0 questions, Ta Quang Son
|