Maple 2019 Questions and Posts

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

How to isolate t2 from equation A. Such that t2 can be written in form of i like -> t2 = i * something
Attaching sheetq6m.mw

How should i remove all brackets and conditions, such that i can fetch only equation t2 = something. I am attaching the image below.  

I looking to create a GUI may be from outside say script language or any given language may be 

The main intention is I have my

maple code

And 

A python code

In the same folder say

I create a GUI with two buttons

When I click one button it runs my maple file in that folder and generates the output

Second button runs the python file that folder generates the output

Is such a coding  creatable 

One more import is can we call a maple code to run from python like how we call exe files

And 

Can we call python compiler attached and file from maple and run it 

Dears,
How can I work with a LogNormal distribution represented by a mean and standard deviation?
I see that is with exp(Normal(mu,sigma)), but I dont sure. Would you please help me with a example using LN(mean=20,standard deviation=5)?
I will use in PDF, CDF and RandomVariable. 

How to find G(0)??

M2.mw

I will have excel sheet with minium 500 coulmns and 1000 rows say

For sample to explain my question I attach a demo excel

All my columns have headers

I am looking to find all 2 way multiplication and add them as columns to my excel sheet and return it as a new excel sheet say

The column names for the new 2 way column should be like the

header name of column you are multiply * the name of the other columsn

Now in sample file if i multiple column with name A with column with name B I get a new column with header A*B the header name should be inserted and

Below that all the elements of that A column multiplied  with that of B should come

I am looking to form columns for all possible2  way multiplication for the excel I will give.

As you can see the demo file

Excel_to_explain.xlsx

Kind help please

Hello! I've been trying to solve system of non-linear differential equations. The equations are quite messy, so I've attached the file itself dsolve.mw. I have read about the similar problems, but they all are related to some expressions having multiple branches. I'm not quite sure where this problem occurs (if it does) here and how to solve it.

HI, I attach  a document (Pade_Approximants_for_alpha.mw) extract showing the errors (Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic
).

Can any one help us please?

Thanks. Syed Asadullah Shah

I have to maximize my non linear objective function TBCI (given in attached worksheet) with 4 inequality constraints. The decision variables are i and q.The range of i is 0 to 1 and of q is 0 to 76.

When i tru to solve it using NLP solve it is showing error-"Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of equalities and inequalities".

Please help me to solve it. please find attached the maple file

restart

with(plots); with(DEtools); with(LinearAlgebra); with(Student[VectorCalculus]); with(linalg); with(Optimization); with(student)

TC := proc (Q) options operator, arrow; O1*(1-beta)*D/Q+(1/2)*h1*Q+(1/2)*h2*(gamma-beta)*Qr/gamma+O2*beta*D/Qr+r*beta*D-q*beta*D-P*(1-i)*beta*D end proc

proc (Q) options operator, arrow; Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(O1, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(beta))), Student:-VectorCalculus:-D), Q^Student:-VectorCalculus:-`-`(1)), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(h1, Q), 2^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(h2, Student:-VectorCalculus:-`+`(gamma, Student:-VectorCalculus:-`-`(beta))), Qr), Student:-VectorCalculus:-`*`(2, gamma)^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(O2, beta), Student:-VectorCalculus:-D), Qr^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(r, beta), Student:-VectorCalculus:-D)), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(q, beta), Student:-VectorCalculus:-D))), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(P, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(i))), beta), Student:-VectorCalculus:-D))) end proc

(1)

diff(TC(Q), Q)

-O1*(1-beta)*Student:-VectorCalculus:-D/Q^2+(1/2)*h1

(2)

simplify(isolate(%, Q))

Q = RootOf(2*Student:-VectorCalculus:-D*O1*beta+_Z^2*h1-2*Student:-VectorCalculus:-D*O1)

(3)

diff(TC(Q), Qr)

(1/2)*h2*(gamma-beta)/gamma-O2*beta*Student:-VectorCalculus:-D/Qr^2

(4)

simplify(isolate(%, Qr))

Qr = RootOf((beta*h2-gamma*h2)*_Z^2+2*gamma*O2*beta*Student:-VectorCalculus:-D)

(5)

diff(TC(Q), `$`(Q, 2))

2*O1*(1-beta)*Student:-VectorCalculus:-D/Q^3

(6)

diff(TC(Q), `$`(Qr, 2))

2*O2*beta*Student:-VectorCalculus:-D/Qr^3

(7)

TC1 := proc (Q, Qr) options operator, arrow; O1*(-beta*i+1)*D/Q+(1/2)*h1*Q+(1/2)*h2*(-beta*i+gamma)*Qr/gamma+O2*i*beta*D/Qr+r*i*beta*D-q*i*beta*D-P*(1-i)*i*beta*D end proc

proc (Q, Qr) options operator, arrow; Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(O1, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(i, beta)))), Student:-VectorCalculus:-D), Q^Student:-VectorCalculus:-`-`(1)), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(h1, Q), 2^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(h2, Student:-VectorCalculus:-`+`(gamma, Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(i, beta)))), Qr), Student:-VectorCalculus:-`*`(2, gamma)^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(O2, i), beta), Student:-VectorCalculus:-D), Qr^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(r, i), beta), Student:-VectorCalculus:-D)), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(q, i), beta), Student:-VectorCalculus:-D))), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(P, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(i))), i), beta), Student:-VectorCalculus:-D))) end proc

(8)

diff(TC1(Q, Qr), Q)

-O1*(-beta*i+1)*Student:-VectorCalculus:-D/Q^2+(1/2)*h1

(9)

a1 := isolate(-O1*(-beta*i+1)*D/Q^2+(1/2)*h1, Q)

Q = RootOf(2*Student:-VectorCalculus:-D*O1*beta*i+_Z^2*h1-2*Student:-VectorCalculus:-D*O1)

(10)

diff(TC1(Q, Qr), Qr)

(1/2)*h2*(-beta*i+gamma)/gamma-O2*i*beta*Student:-VectorCalculus:-D/Qr^2

(11)

a2 := isolate(diff(TC1(Q, Qr), Qr), Qr)

Qr = RootOf((beta*h2*i-gamma*h2)*_Z^2+2*gamma*O2*i*beta*Student:-VectorCalculus:-D)

(12)

TC2 := proc (Q) options operator, arrow; O1*(1-gamma)*D/Q+(1/2)*h1*Q+r*gamma*D-q*gamma*D-P*(1-i)*gamma*D end proc

proc (Q) options operator, arrow; Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`+`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(O1, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(gamma))), Student:-VectorCalculus:-D), Q^Student:-VectorCalculus:-`-`(1)), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(h1, Q), 2^Student:-VectorCalculus:-`-`(1))), Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(r, gamma), Student:-VectorCalculus:-D)), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(q, gamma), Student:-VectorCalculus:-D))), Student:-VectorCalculus:-`-`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(Student:-VectorCalculus:-`*`(P, Student:-VectorCalculus:-`+`(1, Student:-VectorCalculus:-`-`(i))), gamma), Student:-VectorCalculus:-D))) end proc

(13)

b1 := isolate(diff(TC2(Q), Q), Q)

Q = RootOf(2*Student:-VectorCalculus:-D*O1*gamma+_Z^2*h1-2*Student:-VectorCalculus:-D*O1)

(14)

E1 := eval(a1, [P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, beta = 0.5e-1, gamma = 0.4e-1, q = 7.65, r = 382.5, i = .5])

Q = RootOf(76.5*_Z^2-20354080.50)

(15)

simplify(E1)

Q = 515.8162578

(16)

E2 := eval(a2, [P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, beta = 0.5e-1, gamma = 0.4e-1, q = 7.65, r = 382.5, i = .5])

Qr = RootOf(.57375*_Z^2-6958.66000)

(17)

simplify(E2)

Qr = 110.1289401

(18)

Totcost := eval(TC1(Q, Qr), [Q = 516, Qr = 110, P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, beta = 0.5e-1, gamma = 0.4e-1, q = 7.65, r = 382.5, i = .5])

-25502.577

(19)

TB1 := B1*D*P*beta*i-D*beta*i*q

B1*Student:-VectorCalculus:-D*P*beta*i-Student:-VectorCalculus:-D*beta*i*q

(20)

TBC := eval(TB1, [B1 = 3.36, P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, beta = 0.5e-1, gamma = 0.4e-1, r = 382.5])

-17396.65*q*i+44716349.16*i

(21)

Totincent := P*i^2*beta*D

P*i^2*beta*Student:-VectorCalculus:-D

(22)

TI := eval(Totincent, [B1 = 3.36, P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, beta = 0.5e-1, gamma = 0.4e-1, r = 382.5])

13308437.25*i^2

(23)

NULL

simplify(subs(P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, gamma = 0.4e-1, q = 7.65, r = 382.5, beta = 0.5e-1, Q = sqrt((2*(-beta*i+1))*O1*D/h1))); simplify(subs(P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, gamma = 0.4e-1, q = 7.65, r = 382.5, beta = 0.5e-1, Qr = sqrt(2*i*beta*gamma*O2*D/((gamma-beta)*h2))))

Q = 3230.787830*(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)

 

Qr = 190.7489196*(-i)^(1/2)

(24)

TCo := eval(TC1(Q, Qr), [Q = 3230.787830*sqrt(-0.1307189542e-2*i+0.2614379084e-1), Qr = 190.7489196*sqrt(-i), P = 765, D = 347933, O1 = 30, O2 = 10, h1 = 76.5, h2 = 38.25, gamma = 0.4e-1, q = 7.65, r = 382.5, beta = 0.5e-1])

3230.787829*(-0.5e-1*i+1)/(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)+123577.6345*(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)+91201.82720*(-0.5e-1*i+0.4e-1)*(-i)^(1/2)+912.0182718*i/(-i)^(1/2)+6521134.252*i-13308437.25*(1-i)*i

(25)

eq1 := TCo <= 0

3230.787829*(-0.5e-1*i+1)/(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)+123577.6345*(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)+91201.82720*(-0.5e-1*i+0.4e-1)*(-i)^(1/2)+912.0182718*i/(-i)^(1/2)+6521134.252*i-13308437.25*(1-i)*i <= 0

(26)

eq2 := 0 <= q/P and q/P <= 1

0 <= q/P and q/P <= 1

(27)

eq3 := 0 <= i and i <= gamma/beta

0 <= i and i <= gamma/beta

(28)

eq4 := TBC >= 0

0 <= -17396.65*q*i+44716349.16*i

(29)

``

TBCI := TBC-TCo+TI

-17396.65*q*i+38195214.91*i-3230.787829*(-0.5e-1*i+1)/(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)-123577.6345*(-0.1307189542e-2*i+0.2614379084e-1)^(1/2)-91201.82720*(-0.5e-1*i+0.4e-1)*(-i)^(1/2)-912.0182718*i/(-i)^(1/2)+13308437.25*(1-i)*i+13308437.25*i^2

(30)

NLPSolve(TBCI, {eq1, eq2, eq3, eq4}, assume = nonnegative)

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of equalities and inequalities

 

``

This is Maple 2019. Suppose a directed graph D is given. 

I know that "Cycles≔CycleBasis(D)" lists down all the cycles in D and "numelems(Cycles)" gives the number of cycles in D. But if I only want to count the number of directed cycles of length k, say k=4, in D, is there a Maple function that gives us that?

Thank you all.

Dears,
I have a problem whem try to solve a optimization probolem.
The equations are "complex" (G1 equation), and this error is showed "Error, (in Optimization:-NLPSolve) could not store 0.1749271137e-1*(588.000000000000+72.0000000000000*(-3.03333333+.333333333333333*MM)*(MM-17.80)+72.0000000000000*(.333333333333333*NN-3.5666666666667)*(17.00-1.*NN)+24.50000000*(2.90+4.666666667*tan(1.000000000*arctan(.166666666666667*MM-2.96666666666667)))*(18.00+5.627472876000*sin(-1.570796327+1.000000000*arctan(.166666666666667*MM-2.96666666666667))/sin(-1.745329252+1.000000000*arctan(.166666666666667*MM-2.96666666666667)))*cos(-.5235987756000+1.000000000*arctan(.166666666666667*MM-2.96666666666667))^2*sin(.3490658504000+1.000000000*arctan(.166666666666667*MM-2.9666 ... 756000+1.000000000*arctan(.166666666666667*MM-2.96666666666667))^2)-1. in a floating-point rtable".
Someone can help me?

ATS := proc(NN::float, MM::float) 
L[7]*H[4] + L[4]*H[2] + L[1]*(H[1] - H[2]) + 1/2*(P[X1] - NN)*(H[1] - H[2]) + 1/2*(MM - P[XF])*(H[1] - H[2]); 
end proc;
bounds := 14.90 .. 16.90, 17.90 .. 19.90;
cstr8 := proc(NN::float, MM::float) 
G1 - FS; 
end proc;

NLPSolve(ATS, {cstr8}, bounds, initialpoint = [15.90, 18.90], assume = nonnegative)

Maple Input:
restart; with(RealDomain); log[2](x^2 - 6*x) = 3 + log[2](1 - x); Maple returns as solution
ln\x - 6 x/ ln(1 - x) ------------ = 3 + --------- ln(2) ln(2) "(->)" [[x = 2], [x = -4]]
Is the solution x = 2 correct?

Substituting x=2 into the original Function Maple returns correct: log[2](2^2 - 6*2);

undefined and log[2](1 - 2).; undefined. So x =2 should not be a solution of this function.

2 3 4 5 6 7 8 Last Page 4 of 46