Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

A Happy New Year, people in mapleprimes,

I have a question, but this might be an inappropriate question to this site.

In Introduction to Maple, there is a calculation with a double square root.
Related to it, I want to calculate the following expression, which has a value of zero.

-3*(sqrt(10+4*sqrt(5)))+sqrt(50+20*sqrt(5))+sqrt(10-4*sqrt(5))+sqrt(50-20*sqrt(5));

Is there any way to use maple  so as to explain how the above expression takes the value of zero?

On earth, I cannot understand why this takes zero.

I hope you will give me a hint.

Thanks in advance.

 

I am trying to assess stability from real roots of Eigenvalues that are returned in the RootOf from. I tried allvalues(), evalf() both return the same RootOf list. If memory serves me correctly any square matrix should have and Eigenvalue solution.

Any suggestions?

Eignevalues.mw
 

NULL

with(LinearAlgebra)

Xd := 1.81
Xq := 1.76; Xpd := .3; Xe := .65; re := 0.3e-2; et := 1.0

M := 7; Tdo := 8; Ke := 200; Te := 0.2e-1

Q := -2.7; k := 0.2e-1; m := 1; FORW := 1

D curve PointsPoints      
             
           Pt__a := 0, .66

Pt__b := .56, .55 
Pt__c := .94, .34; Pt__d := 1.0, 0; Pt__h := 1.0, 0; Pt__g := .95, -.311; Pt__f := .59, -.398; Pt__e := 0, -.428
PSS

KSTAB := 9.6

     
TW := 1.4; T1 := .154

T2 := 0.33e-1

P := 1

Q := -.5

eto := abs(et); Ipo := P/eto; Iqo := Q/eto; Eqo := sqrt((Iqo*Xq+eto)^2+(Ipo*Xq)^2); Eo := sqrt((-Ipo*re-Iqo*Xe+eto)^2+(Ipo*Xe-Iqo*re)^2); `sinδo` := (eto*Ipo*(Xq+Xe)-re*Xq*(Ipo^2+Iqo^2)-eto*Iqo*re)/(Eqo*Eo); `cosδo` := (eto*(eto+Iqo*(Xq-Xe)-Ipo*re)-Xe*Xq*(Ipo^2+Iqo^2))/(Eqo*Eo); iqo := (Ipo*(Iqo*Xq+eto)-Iqo*Ipo*Xq)/Eqo; ido := (Ipo^2*Xq+Iqo*(Iqo*Xq+eto))/Eqo; eqo := eto*(Iqo*Xq+eto)/Eqo; edo := iqo*Xq; A := re^2+(Xe+Xpd)*(Xq+Xe); K1 := Eqo*Eo*(re*`sinδo`+(Xe+Xpd)*`cosδo`)/A+iqo*Eo*((Xq-Xpd)*(Xq+Xe)*`sinδo`-re*(Xq-Xpd)*`cosδo`)/A; K2 := re*Eqo/A+iqo*(1+(Xq+Xe)*(Xq-Xpd)/A); K3 := 1/(1+(Xq+Xe)*(Xd-Xpd)/A); K4 := Eo*(Xd-Xpd)*(Xq+Xe)*`sinδo`/A-re*`cosδo`; K5 := edo*Xq*(re*Eo*`sinδo`+(Xe+Xpd)*Eo*`cosδo`)/(eto*A)+eqo*Xpd*(re*Eo*`cosδo`-(Xq+Xe)*Eo*`sinδo`)/(eto*A); K6 := eqo*(1-Xpd*(Xq+Xe)/A)/eto+edo*Xq*re/(eto*A); A4 := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 377, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = -K1/M, (2, 2) = 0, (2, 3) = -K2/M, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = -K4/Tdo, (3, 2) = 0, (3, 3) = -1/(K3*Tdo), (3, 4) = -1/Tdo, (3, 5) = 0, (3, 6) = 0, (4, 1) = K5*Ke/Te, (4, 2) = 0, (4, 3) = K6*Ke/Te, (4, 4) = -1/Te, (4, 5) = Ke/Te, (4, 6) = 0, (5, 1) = -K1*KSTAB*T1/(T2*M), (5, 2) = 0, (5, 3) = -K2*KSTAB*T1/(T2*M), (5, 4) = 0, (5, 5) = -`#mn("1")`/TW, (5, 6) = -(T1+TW)/(T2*TW), (6, 1) = -K1*KSTAB/M, (6, 2) = 0, (6, 3) = -K2*KSTAB/M, (6, 4) = 0, (6, 5) = 0, (6, 6) = -`#mn("1")`/TW}); Eig := Eigenvalues(A4)

allvalues(Eig)

evalf(Eig[1])

RootOf(10000000000*_Z^6+(14285714290*`#mn("1")`+503236834300)*_Z^5+(5102040817*`#mn("1")`^2+718909763500*`#mn("1")`+1193248786000)*_Z^4+(256753486900*`#mn("1")`^2+1704641123000*`#mn("1")`-94259434520000)*_Z^3+(608800401100*`#mn("1")`^2-52350222800000*`#mn("1")`+1273591282000000)*_Z^2+(10698531930000*`#mn("1")`^2+632925408400000*`#mn("1")`+1000000)*_Z+226044788700000*`#mn("1")`^2-10000000)

(1)

``


 

Download Eignevalues.mw
 

 


 

Download Eignevalues.mw

 

 

Hi,

I asked a question before, how to shift subscript of u(i,j):

P: u[i,j] -->  u[i+1,j]

https://www.mapleprimes.com/questions/223136-How-To-Define-An-Operator

How about an arbitrary expression?

P: u[i,j]^2 v[i,j]+u[i-1,j]  -->  u[i+1,j]^2 v[i,j]+u[i,j]

thanks.

 

Hi, I need to calculate some discrete variational problems, but it's a hard work just by hand.

Is there any toolboxes about the discrete variational computation? Or how to design a program to do that?

In particular, I need to realize the functions:

1. the linearized operator and the adjoint operator of some expressions.

       For example:

       the linearized operator of u(n,m+1)u(n+1,m) is u(n+1,m)Tm+u(n,m+1)Tn

       the adjoint operator is u(n+1,m-1)T^(-1)m+u(n-1,m+1)T^(-1)n,

       (The latter is just the discrete Euler operator.)

      Tm, Tn is the shift operator, T^(-1) is the inverse operator of T.

2. discrete Euler-Lagrange equation.

I am not familar with the maple, please help!

Thanks.

Hello

What is the fairest way to divide a shelf of books up between n people?

Partition_problem2.mw

How do I introduce the first derivative of M when i<> k and aij when i <> j and aii in Maple?

 

 

Hello

In my annuity recursion formula I have a payment at the beginning of the month.

How can I change the formula to reflect an addition made on a different day of the month?

This could be done in Excel of course, but I am looking for a single formula which rsolve supplies.

I had no joy with Finance:-growingannuity

Recurring_pmts.mw

 

First, is patmatch command is the main Maple command for doing pattern matching on expressions?  

I trying to understand how it works, but failing on the most basic expressions. 2 basic questions

1)patmatch( x^n/y^n,  x∷symbol^n::symbol /  y::symbol^n::symbol);
                               false

It did not like that I told it x::symbol in the above. Why? But when I remove ::symbol it works

patmatch(x^n/y^n,x^n::symbol/y^n::symbol);
                   true

But when I do "whattype(x);" Maple replies saying it is "symbol"

2)Trying to match x^2/y^2, not having any luck
patmatch(x^2/y^2,x^n::nonunit(integer)/y^n::nonunit(integer));
                        false

patmatch(x^2/y^2,x^n::integer/y^n::integer);
                         false

How to match x^2/y^2? Why the above fail? 

I learn better by examples. Is there a place where one can look at many examples using patmatch? 

The help page have only few examples, and the link to the page called "examples,patmatch" does not help either with few examples and many are the same as the other page.  I tried to run it using 

infolevel[all]:=5:
printlevel:=10:

To see if I can figure what is wrong, but did not understand any of the code printed.

Compare this to Mathematica, where pattern matching there has hundreds of examples and detailed tutorials just on this one subject.

 



   


 

How do I access and plot the values from indexed tables QQ vs  PP? 
 


 

``

with(LinearAlgebra)

``

Xd := 1.6Xq := 1.55; Xpd := .32; Xe := .4; re := 0; Xe := .4; et := 1.0

M := 3; Tdo := 6.0; Ke := 5; Te := 0.5e-1

Q := -2.7; k := 0.2e-1; m := 1; FORW := 1; P := k

``

``

while `or`(P < 1.0 and FORW = 1, `and`(k > 0.1e-1, FORW = 0)) do PP[m] := k; P := PP[m]; if FORW = 1 then Q := -2.7 else Q := 3 end if; Test := 0; while `or`(Test = 0 and Q < 3 and FORW = 1, `and`(`and`(Test = 0, k > 0.1e-1), FORW = 0)) do if FORW = 1 then Q := Q+0.1e-1 else Q := Q-0.1e-1 end if; eto := abs(et); Ipo := P/eto; Iqo := Q/eto; Eqo := sqrt((Iqo*Xq+eto)^2+(Ipo*Xq)^2); Eo := sqrt((-Ipo*re-Iqo*Xe+eto)^2+(Ipo*Xe-Iqo*re)^2); `sin&delta;o` := (eto*Ipo*(Xq+Xe)-re*Xq*(Ipo^2+Iqo^2)-eto*Iqo*re)/(Eqo*Eo); `cos&delta;o` := (eto*(eto+Iqo*(Xq+Xe)-Ipo*re)-Xe*Xq*(Ipo^2+Iqo^2))/(Eqo*Eo); iqo := (Ipo*(Iqo*Xq+eto)-Iqo*Ipo*Xq)/Eqo; ido := (Ipo^2*Xq+Iqo*(Iqo*Xq+eto))/Eqo; eqo := eto*(Iqo*Xq+eto)/Eqo; edo := iqo*Xq; A := re^2+(Xe+Xpd)*(Xq+Xe); K1 := Eqo*Eo*(re*`sin&delta;o`+(Xe+Xpd)*`cos&delta;o`)/A+iqo*Eo*((Xq+Xpd)*(Xq+Xe)*`sin&delta;o`-re*(Xq-Xpd)*`cos&delta;o`)/A; K2 := re*Eqo/A+iqo*(1+(Xq+Xe)*(Xq-Xpd)/A); K3 := 1/(1+(Xq+Xe)*(Xd-Xpd)/A); K4 := Eo*(Xd-Xpd)*(Xq+Xe)*`sin&delta;o`/A-re*`cos&delta;o`; K5 := edo*Xq*(re*Eo*`sin&delta;o`+(Xe+Xpd)*Eo*`cos&delta;o`)/(eto*A)+eqo*Xpd*(re*Eo*`cos&delta;o`-(Xq+Xe)*Eo*`sin&delta;o`)/(eto*A); K6 := eqo*(1-Xpd*(Xq+Xe)/A)/eto+edo*Xq*re/(eto*A); A3 := Matrix(4, 4, {(1, 1) = 0, (1, 2) = 377, (1, 3) = 0, (1, 4) = 0, (2, 1) = -K1/M, (2, 2) = 0, (2, 3) = -K2/M, (2, 4) = 0, (3, 1) = -K4/Tdo, (3, 2) = 0, (3, 3) = -1/(K3*Tdo), (3, 4) = 1/Tdo, (4, 1) = -Ke*K5/Te, (4, 2) = 0, (4, 3) = -Ke*K6/Te, (4, 4) = -1/Te}); Eig := Eigenvalues(A3); if `and`(`and`(`and`(Re(Eig[1]) < 0, Re(Eig[2]) < 0), Re(Eig[3]) < 0), Re(Eig[4]) < 0) then Test := 1 else Test := 0 end if end do; if `and`(FORW = 1, Q > 2.8) then m := m-2; k := k-0.2e-1 else QQ[m] := Q end if; m := m+1; if FORW = 1 then k := k+.1 else k := k-.1 end if end do
``

`` 

PP[]; QQ[]; PP[() .. ()]

PP[() .. ()]

(1)

PP[9]; QQ[9]

-.70

(2)

PP()

(table( [( 1 ) = 0.2e-1, ( 2 ) = .12, ( 3 ) = .22, ( 4 ) = .32, ( 5 ) = .42, ( 6 ) = .52, ( 7 ) = .62, ( 9 ) = .82, ( 8 ) = .72, ( 11 ) = 1.02, ( 10 ) = .92 ] ))()

(3)

``

QQ()

(table( [( 1 ) = -.42, ( 2 ) = -.45, ( 3 ) = -.49, ( 4 ) = -.55, ( 5 ) = -.60, ( 6 ) = -.64, ( 7 ) = -.67, ( 9 ) = -.70, ( 8 ) = -.69, ( 11 ) = -.69, ( 10 ) = -.70 ] ))()

(4)

 

 

 

NULL

NULL


 

Download SS_Stability(Ks)_3.mw

I want to determine components of a vector in explicit form.  Let I have vector nn[mu] with components (1,0,0,0). Is it possible to explain to Maple it?

I tried to do the next:

with(Physics);
Setup(dimension = 4);
Setup(metric = {(1, 1) = -1, (2, 2) = -1, (3, 3) = -1, (4, 4) = 1});
Setup(mathematicalnotation = true);
Coordinates(X);
Setup(tensors = {nn[mu](X)});
nn[mu] = Matrix(1, 4, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 1});
nn[mu]*k[mu];
SumOverRepeatedIndices(%)

 

The answer that maple gives is:

nn[1]*k[`~1`]+nn[2]*k[`~2`]+nn[3]*k[`~3`]+nn[4]*k[`~4`]

 

So, doesn't Maple understand that nn[1]=nn[2]=nn[3]=0?

Dear sir,

 

I request the Maple experts to help me on the above cited subject.

 

 

With best regards.

 

Mr M ANAND,

Associate Professor in Mathematics

Hey

Can someone figure out why the output does not produce hyperlinked:

A1

B1

A2

B2 

(in the same order as Games).

hyperlink_do-loop.mw

Hi,

I need help. My Maple 2017 do not launch in my MacBook Air (11-inch, Mid 2011, 1.8 GHz Intel Core i7, 4 GB 1333 MHz DDR3, Intel HD Graphics 3000 384 MB) . Whe I open it, I only see the icon of Maple 2017 on the top left on my screen.

 

Now I have macOs High Sierra but with the older operating system it did not launch either.

 

Can you help me, please?

 

Best Regards,

Clara

Hello

Long time asker of minimization problems here.

Following on from my question on 2D packing.

I found this "solved" problem for packing 3D items efficiently. See Illustration 6.13

https://www.researchgate.net/file.PostFileLoader.html?id=59938b635b49527571134c33&assetKey=AS%3A527790252490752%401502846410852

Some discrepancies with constraint set-up (first one), number of variables and the optimized solution.

3DbinPack2.mw

 

Hello

When I export a worksheet table as HTML,MATH EXPRESSIONS: GIF the resulting .html file is 100% readable.

screenshot:

But when i send the html file to myself over email, I get gibberish

The (acer) code for the top is... .....Equation(Standings[id]:-mu &+- Standings[id]:-sigma....

and below opponents rating: ....Cell(Equation(thetable[id][':-losses'][r][1] &+- thetable[id][':-losses'][r][2],......

Anyone shed?

First 21 22 23 24 25 26 27 Last Page 23 of 40