Dr. Patrick T

## 2083 Reputation

13 years, 259 days

## try this...

I'm not very familiar with summations, but I know this:

# The add command is used to add up an explicit sequence of values.
# The sum command is for symbolic summation.

if you set:

n:=100;

at the top of the worksheet, and replace sum with add, you will get the desired:

exp(-100)

## Greeky...

fascinating stuff, thanks.

more pragmatic: is there a shorthand for MatrixInverse(Q) ? or shall I use alias?

I know that V^%T stands for Transpose(V), is there a shorthand like that for MatrixInverse?

## JordanForm?...

restart;
A:=Matrix([[1,2,-1],[1,0,1],[4,-4,5]]);

[1     2    -1]
[             ]
A := [1     0     1]
[             ]
[4    -4     5]

#using LinearAlgebra package
(J, Q) := LinearAlgebra:-JordanForm(A,output=['J','Q'] );
LinearAlgebra:-MatrixInverse(Q) . A . Q; #check
Q . J . LinearAlgebra:-MatrixInverse(Q); #check

[1    0    0]  [1/2     -2    1/2 ]
[           ]  [                  ]
J, Q := [0    2    0], [-1/2     1    -1/2]
[           ]  [                  ]
[0    0    3]  [ -1      4     -2 ]

[1    0    0]
[           ]
[0    2    0]
[           ]
[0    0    3]

[1     2    -1]
[             ]
[1     0     1]
[             ]
[4    -4     5]

## thanks...

very useful suggestions, thanks.

## velocity -> magnitude...

Good news. From the Help menu, it appears that the option "color=velocity" was renamed "color=magnitude". I had missed that on a first reading.

And, naturally, "size=velocity" has become "size=magnitude"!

velocity seems like a more natural word, but never mind. I'm happy today, I can play some more with my phase diagrams!

f := (x,y) -> x*(1-y-0.1*x): g := (x,y) -> 0.3*y*(x-1):
MLV:=[diff(x(t),t)=f(x(t),y(t)), diff(y(t),t) = g(x(t),y(t))];
ivs:=[[x(0)=1,y(0)=0.5],[x(0)=1,y(0)=1.5]];
DEtools[DEplot](MLV,[x(t),y(t)],t=0..10,ivs,arrows=smalltwo,
dirfield=[12,12],color=magnitude[green,red]);

## how did you get these square brackets?...

If you show the code that gave you this expression, chances are someone will be able to tell you how to change your code so that the square brackets are replaced by round brackets (if I understand, this is what you want). The square brackets denote a "list".

## memory use...

I don't know if your program does what you want, and I'm afraid I don't know how to help you out either. But your problem is most likely that you run out of memory -- I was able to run the program for L=60 in less than a minute, but the output is so huge that I couldn't save it!

## solve or fsolve, perhaps?...

solve does, I think, what you're after, but then the expression for V doesn't seem to be explicit (can someone manipulate further to make it explicit under certain assumptions?). fsolve gives you the numerical answer if you're willing to make assumptions about parameter values.

restart;
EQN := V+b = (1/(V*(4*V-b)^3)-c*V-d)/(P*sqrt(T)*V^2);

1
------------ - c V - d
3
V (4 V - b)
EQN := V + b = ----------------------
1/2  2
P T    V

solve(EQN,V);

7    1/2        6    1/2
RootOf(-1 + 64 _Z  P T    + 16 _Z  P T    b

1/2  2           5
+ (-36 P T    b  + 64 c) _Z

1/2  3             4
+ (64 d + 11 P T    b  - 48 c b) _Z

4    1/2         2    3          2      3    2
+ (-48 d b - b  P T    + 12 c b ) _Z  + (12 d b  - c b ) _Z

3
- d _Z b )

fsolve(eval(EQN,{T=1,P=1,b=1,c=1,d=1}),V);

-0.9959275806

## post the code...

I'm not sure I understand what you're saying. C is a variable? how does it vary?

you are more likely to receive feedback if you copy several lines of your codes -- if it's too long, produce a minimal example.

## maybe...

suggestions:

1. have you tried to replace nWcolu[8] by 1, to see if something is produced?

2. you realize that you are producing postscript files and not inline plots?

plotsetup(ps,plotoutput=lower[j],plotoptions=`,color,portrait,noborder`):

## I...

I^2;

-1

j^2;

2
j

## check Help menu for ChiSquareGoodnessOfF...

with(Statistics):
> infolevel[Statistics] := 1:
> Ob := Array([25, 17, 15, 23, 24, 16]);
> SalesPerDay := sum('Ob'[i], i=1..6)/6;
> Ex := Array([SalesPerDay \$ 6]);
> ChiSquareGoodnessOfFitTest(Ob, Ex, level=0.05);

## Euler-Cauchy equation...

This is a well-known second-order ODE, if I recall it should be solvable in terms of cosines and sines and a logarithm inside of the cosines and sines. There must be a way to ask Maple to get that solution (as opposed to hypergeometric functions):

http://en.wikipedia.org/wiki/Cauchy%E2%80%93Euler_equation

## transparency...

compare display(a,b); with display(b,a); what's happening is that your plots are completely colored, so the second one pastes over the first one. You want to find a way to replace "white" with "transparent".

Here's a relevant link with Robert Israel's advice pasted below for convenience:

http://www.mapleprimes.com/forum/plottingmultipleinequalityconditionssuperimposeeachother

with(plots):
implicitplot(max(x^2+y^2-1, x - y) <= 0, x=-1..1,y=-1..1,
coloring=[red,white],filledregions, gridrefine=3,crossingrefine=3,
transparency=1/2); P1:= %:
implicitplot(max(1/2-x^2-y^2, x*y - 1/4) <= 0, x=-1..1,y=-1..1,
coloring=[blue,white],filledregions, gridrefine=3,crossingrefine=3,
transparency=1/2); P2:= %:

display([P1,P2]);

## many problems...

if this is your full code, there are many problems.

eq is defined twice and later used as a function of x and y eq(x,y)

eval usually takes an argument, like  eval(eq, x=1)

p3 is undefined

Maple is case- and spelling-sensitive. I think you're looking for the following call: LinearAlgebra[LeastSquares]