Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSLV input

34 views
Skip to first unread message

Nicola Bressanin

unread,
Jan 17, 2012, 5:03:17 AM1/17/12
to
From the CAS help and HLP49, MSLV accepts an input like this:
3: [ 'EQ1' 'EQ2' .. ] n equations
2: [ 'var1' 'var2' .. ] n unknowns
1: [ var1guess var2guess .. ] initial guesses for the aforementioned
variables

Given Rouche-Capelli conditions are satisfied,problem is converging,a
solution exists and the guesses are in a converging zone,it converges.

Is it possible to use previously stored equations?
I've tried to,but it doesn't work

John H Meyers

unread,
Jan 19, 2012, 1:53:42 AM1/19/12
to
I've tried too, and it did work.

.


Nicola Bressanin

unread,
Jan 19, 2012, 3:40:40 AM1/19/12
to
How?

John H Meyers

unread,
Jan 19, 2012, 6:22:11 AM1/19/12
to
> How?

Let's first hear what you tried! (and the results)

.

Nicola Bressanin

unread,
Jan 19, 2012, 7:43:54 AM1/19/12
to
> > How?
>
> Let's first hear what you tried! (and the results)
>
>

First i stored the two equations as EQA and EQB

EQA contains (text mode) 'C=SQ(D)/3.*pi*eap*A'
EQB contains (text mode) 'D=2.*pi*(Aa-D*(1.+S)/(pi*A)-B)'

Then as input for MSLV:
3: [EQA EQB]
2: [D A]
1: [.15 10.]
then i invoke MSLV. No matter how D and A are chosen,it will keep "A"
constant and will diverge D by steps of .25. This suggest it isn't
evaluating the equations, so the trouble must be in stack level 3 i
guess..?
I enter them as ['EQA' 'EQB'] (enter)

John H Meyers

unread,
Jan 19, 2012, 10:20:03 AM1/19/12
to
On 1/19/2012 6:43 AM, Nicola Bressanin wrote:

> First i stored the two equations as EQA and EQB
>
> EQA contains (text mode) 'C=SQ(D)/3.*pi*eap*A'
> EQB contains (text mode) 'D=2.*pi*(Aa-D*(1.+S)/(pi*A)-B)'
>
> Then as input for MSLV:
> 3: [EQA EQB]
> 2: [D A]
> 1: [.15 10.]
> then i invoke MSLV. No matter how D and A are chosen,it will keep "A"
> constant and will diverge D by steps of .25. This suggest it isn't
> evaluating the equations

The above are not formatted to be ready for direct transfer to the calculator,
and the values of various additional variables have not been provided,
so let's turn instead to the example from built-in calculator HELP:

Original form:

[ 'SIN(X)+Y' 'X+SIN(Y)=1' ]
[ 'X' 'Y' ]
[ 0 0 ]
MSLV @ Produces the answer as suggested by HELP


Let's separately save the original equations and re-try:

'SIN(X)+Y' 'EQA' STO
'X+SIN(Y)=1' 'EQB' STO
[ 'EQA' 'EQB' ]
[ 'X' 'Y' ]
[ 0 0 ]
MSLV @ Oops -- this does what you have described!

The problem seems to be that the CAS does not recognize
that 'EQA' and 'EQB' are functions of 'X' and 'Y'

When I tested with just one single equation, this did not come up :)


Now let's try something slightly more explicit:

\<< \-> X Y 'SIN(X)+Y' \>> 'EQA' STO
\<< \-> X Y 'X+SIN(Y)=1' \>> 'EQB' STO
[ 'EQA(X,Y)' 'EQB(X,Y)' ]
[ 'X' 'Y' ]
[ 0 0 ]
MSLV @ Produces the answer as suggested by HELP

Have we discovered the principle now?

[r->] [OFF]

John H Meyers

unread,
Jan 19, 2012, 10:32:28 AM1/19/12
to
On 1/19/2012 9:20 AM, John H Meyers wrote:

> \<< \-> X Y 'SIN(X)+Y' \>> 'EQA' STO
> \<< \-> X Y 'X+SIN(Y)=1' \>> 'EQB' STO

Another, neater way to define these same variables is:

'EQA(X,Y)=SIN(X)+Y' DEFINE
'EQB(X,Y)=X+SIN(Y)-1' DEFINE

Now we can proceed with:

[ 'EQA(X,Y)' 'EQB(X,Y)' ]
[ 'X' 'Y' ]
[ 0 0 ]
MSLV @ Produces the answer as suggested by HELP


[r->] [OFF]

Nicola Bressanin

unread,
Jan 19, 2012, 1:42:37 PM1/19/12
to
Seems like it's still not working.
The two original equations,plus constant' values:

EQCd
Cd=(CL^2)/(3*pi*eap*AR)

EQCL
CL=2*pi*(ag-CL*(1+t)/(pi*AR)-aL0)

eap=0.85
ag=0.07
aL0=-0.03625
t=0.064

initial CL might be 0.2 and initial AR 10.

With both methods i get apparently the same binaries(i'm doing
everything from 50g's keyboard):

EQCd
\<< \-> CL AR 'SQ(CL)/(3.*pi*eap*AR)-Cd' \>>

EQCL
\<< \-> CL AR '2.*pi*(ag-CL*(1.+t)/(pi*AR)-aL0)-CL' \>>

['EQCd(CL,AR)' 'EQCL(CL,AR)']
['CL' 'AR']
[.2 10.]
MSLV @ CL diverges to minus infinity

John H Meyers

unread,
Jan 24, 2012, 6:45:57 PM1/24/12
to
On 1/19/2012 12:42 PM, Nicola Bressanin wrote:

> Seems like it's still not working.

What is the actual solution to your equation set?

Here are much simpler examples,
using only the 1-equation numeric root finder,
which fail to find a useful solution, for valid reasons:

'INV(X)' 'X' 2 ROOT @ No solution exists

'X*EXP(-X)' 'X' 2 ROOT @ Solution X=0 is not found

How do we know whether your equations and initial guesses
should lead to a solution or not?

[r->] [OFF]

0 new messages