## 11354 Reputation

15 years, 87 days

## fnormal followed by simplify...

You may also want to remove terms of the form 0.*I by using simplify:

s^5+3.236067976*s^4+(1.*10^(-10)*I)*s^4+5.236067975*s^3+(7.*10^(-10)*I)*s^3-(3.*10^(-10)*I)*s+5.236067975*s^2+3.236067977*s+1.000000000 :
fnormal(%);
simplify(%);

Preben Alsholm

## fnormal followed by simplify...

You may also want to remove terms of the form 0.*I by using simplify:

s^5+3.236067976*s^4+(1.*10^(-10)*I)*s^4+5.236067975*s^3+(7.*10^(-10)*I)*s^3-(3.*10^(-10)*I)*s+5.236067975*s^2+3.236067977*s+1.000000000 :
fnormal(%);
simplify(%);

Preben Alsholm

## subs...

I never use algsubs, but very often use subs and eval. They are both extremely useful, both in their own way.

I suppose algsubs has disappointed me in the past. I don't know if it has gotten better, since I don't use it.

Preben Alsholm

## subs...

I never use algsubs, but very often use subs and eval. They are both extremely useful, both in their own way.

I suppose algsubs has disappointed me in the past. I don't know if it has gotten better, since I don't use it.

Preben Alsholm

## An index is needed...

Well, since the output has to be a sum you need an index, just like a definite integral needs an integration variable.

That index could have been made local by the procedure that produced the sum. However, then you wouldn't have immediate access to it.

Preben Alsholm

## An index is needed...

Well, since the output has to be a sum you need an index, just like a definite integral needs an integration variable.

That index could have been made local by the procedure that produced the sum. However, then you wouldn't have immediate access to it.

Preben Alsholm

## Need the whole thing...

Are you defining Res as I did?

Did you execute all lines previous to the ones mentioned last?

Preben Alsholm

## Need the whole thing...

Are you defining Res as I did?

Did you execute all lines previous to the ones mentioned last?

Preben Alsholm

## optimalitytolerance can be set...

You may try setting optimalitytolerance:

res:=LSSolve(Res,{x1<=1,x2<=1,x3<=1,x4<=1,x5<=1,x6<=1,x7<=1,x8<=1,x9<=1,x10<=1,T>=Ti},assume=nonnegative,iterationlimit=5000,optimalitytolerance=0.0001);
[0.00517923021408238112, [T = 2782.09143970567812, n = 10.1585637591277820,

x1 = 0.00872658980230692216, x10 = 0.0748602181855385214,

x2 = 0.0766666505398920090, x3 = 0.579521666596851892,

x4 = 0.0000115210794556045040, x5 = 0.0901704459988488805,

x6 = 0.0852556575745576917, x7 = 0.00577381343641316520,

x8 = 0.00427475756541988076, x9 = 0.0642723480725257840]]

See the help page: ?Optimization, Options

Preben Alsholm

## optimalitytolerance can be set...

You may try setting optimalitytolerance:

res:=LSSolve(Res,{x1<=1,x2<=1,x3<=1,x4<=1,x5<=1,x6<=1,x7<=1,x8<=1,x9<=1,x10<=1,T>=Ti},assume=nonnegative,iterationlimit=5000,optimalitytolerance=0.0001);
[0.00517923021408238112, [T = 2782.09143970567812, n = 10.1585637591277820,

x1 = 0.00872658980230692216, x10 = 0.0748602181855385214,

x2 = 0.0766666505398920090, x3 = 0.579521666596851892,

x4 = 0.0000115210794556045040, x5 = 0.0901704459988488805,

x6 = 0.0852556575745576917, x7 = 0.00577381343641316520,

x8 = 0.00427475756541988076, x9 = 0.0642723480725257840]]

See the help page: ?Optimization, Options

Preben Alsholm

## Scaling...

You may also want to scale the equations.

Here I have scaled the last one:

Res:=map(lhs-rhs,[eq1, eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12*10^(-2)]):
res:=LSSolve(Res,{x1<=1,x2<=1,x3<=1,x4<=1,x5<=1,x6<=1,x7<=1,x8<=1,x9<=1,x10<=1,T>=Ti},assume=nonnegative,iterationlimit=5000);
Warning, limiting number of major iterations has been reached
[0.00517609062184478092, [T = 2782.44660329790214, n = 10.1582899935774478,

x1 = 0.00873618614514319950, x10 = 0.0748388854712784686,

x2 = 0.0767030979399348362, x3 = 0.579548942356043040,

x4 = 0.0000115713864132603826, x5 = 0.0901633563755876583,

x6 = 0.0852311188569541273, x7 = 0.00577787937886131958,

x8 = 0.00427369013816442536, x9 = 0.0642550496232529162]]

Preben Alsholm

## Scaling...

You may also want to scale the equations.

Here I have scaled the last one:

Res:=map(lhs-rhs,[eq1, eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12*10^(-2)]):
res:=LSSolve(Res,{x1<=1,x2<=1,x3<=1,x4<=1,x5<=1,x6<=1,x7<=1,x8<=1,x9<=1,x10<=1,T>=Ti},assume=nonnegative,iterationlimit=5000);
Warning, limiting number of major iterations has been reached
[0.00517609062184478092, [T = 2782.44660329790214, n = 10.1582899935774478,

x1 = 0.00873618614514319950, x10 = 0.0748388854712784686,

x2 = 0.0767030979399348362, x3 = 0.579548942356043040,

x4 = 0.0000115713864132603826, x5 = 0.0901633563755876583,

x6 = 0.0852311188569541273, x7 = 0.00577787937886131958,

x8 = 0.00427369013816442536, x9 = 0.0642550496232529162]]

Preben Alsholm

## Interesting!...

This is interesting.

I think op(RS1S) should be op([1,1..-1],RS1S).

Preben Alsholm

## Interesting!...

This is interesting.

I think op(RS1S) should be op([1,1..-1],RS1S).

Preben Alsholm

## Another way...

I'm using Firefox myself, and mine just asks me if I want to open mulleralg.mw in Maple 13, to which I just hit OK.

Then the worksheet is opened in Maple 13.

I do have Internet Explorer on my computer. If I just execute the link to the worksheet, the screen is filled with xml-code in which the mw-worksheet is written.

So another suggestion is:

http://www.cbu.edu/~wschrein/media/ANA/

which is a directory of a lot of files.

Go to mulleralg.mw.

Right-click on it. Select "Save destination as" (or something very similar; mine speaks Danish).
Then edit the file name so it becomes mulleralg.mw (not the suggested mulleralg.xml) and change file type to "All files".

Now save the file in a place, where you can find it.

Finally open it in Maple and continue as before.

Preben Alsholm

 First 191 192 193 194 195 196 Page 193 of 196
﻿