Maple 2016 Questions and Posts

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

hi

please help me for fsolve algebric equations...

thanks

AGM.mw
 

restart:

F(eta):=sum(a[i]*eta^i,i=0..5):

theta(eta):=sum(b[i]*eta^i,i=0..5):K(eta):=sum(c[i]*eta^i,i=0..5):Omega(eta):=sum(d[i]*eta^i,i=0..5):

``

U1:=diff(theta(eta), eta, eta)-3*Omega(eta)*(F(eta)*(diff(theta(eta), eta))-theta(eta)*(diff(F(eta), eta)))/(2*K(eta))+((diff(K(eta), eta))/K(eta)-(diff(Omega(eta), eta))/Omega(eta))*(diff(theta(eta), eta)) = 0:U2:= diff(F(eta), eta, eta, eta)+Omega(eta)*(3*F(eta)*(diff(F(eta), eta, eta))-(diff(F(eta), eta))^2)/(2*K(eta))+((diff(K(eta), eta))/K(eta)-(diff(Omega(eta), eta))/Omega(eta))*(diff(F(eta), eta, eta))+Omega(eta)/K(eta) = 0:U3:= diff(K(eta), eta, eta)+Omega(eta)*(1.5*F(eta)*(diff(K(eta), eta))-K(eta)*(diff(F(eta), eta)))/K(eta)+((diff(K(eta), eta))/K(eta)-(diff(Omega(eta), eta))/Omega(eta))*(diff(K(eta), eta))+(diff(F(eta), eta, eta))^2-Omega(eta)^2 = 0:U4:= diff(Omega(eta), eta, eta)+Omega(eta)*(3*F(eta)*(diff(Omega(eta), eta))+Omega(eta)*(diff(F(eta), eta)))/(2*K(eta))+((diff(K(eta), eta))/K(eta)-(diff(Omega(eta), eta))/Omega(eta))*(diff(Omega(eta), eta))+Omega(eta)*(diff(F(eta), eta, eta))^2/K(eta)-Omega(eta)^3/K(eta) = 0:

F(eta):=unapply(F(eta),eta):

theta(eta):=unapply(theta(eta),eta):K(eta):=unapply(K(eta),eta):Omega(eta):=unapply(Omega(eta),eta):

U1:=unapply(U1,eta):U2:=unapply(U2,eta):U3:=unapply(U3,eta):U4:=unapply(U4,eta):

 

s1:=F(eta)(0) = 0:

s2:=K(eta)(0) = 0:s3:=Omega(eta)(0) = 0:s4:=theta(eta)(0) = 1:s5:=theta(eta)(1) = 0:s6:=(D(F(eta)))(0) = 0:s7:=(D(K(eta)))(1) = 0:s8:=(D(Omega(eta)))(1) = 0:s9:=((D@@2)(F(eta)))(1) = 0

20*a[5]+12*a[4]+6*a[3]+2*a[2] = 0

(1)

s10:=U1(0):s11:=U2(0):s12:=U3(0):s13:=U4(0):        s14:=U1(1):s15:=U2(1):s16:=U3(1):s17:=U4(1):    s18:=D(U1)(0):s19:=D(U2)(0):s20:=D(U3)(0):s21:=D(U4)(0):     s22:=D(U1)(1):s23:=D(U2)(1):s24:=D(U3)(1):

 

 

Q:=fsolve([s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24],{a[0],a[1],a[2],a[3],a[4],a[5],b[0],b[1],b[2],b[3],b[4],b[5],c[0],c[1],c[2],c[3],c[4],c[5],d[0],d[1],d[2],d[3],d[4],d[5]}):

F(eta):=eval(sum(a[i]*eta^i,i=0..5),Q):

Error, invalid input: eval received S, which is not valid for its 2nd argument, eqns

 

theta(eta):=eval(sum(b[i]*eta^i,i=0..5),Q):K(eta):=eval(sum(c[i]*eta^i,i=0..5),Q):Omega(eta):=eval(sum(d[i]*eta^i,i=0..5),Q):

Error, invalid input: eval received S, which is not valid for its 2nd argument, eqns

 

plot(g(x),x=0..1,axes=boxed,color=green,thickness=2,labels=[x,g]):

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

plot(f(x),x=0..1,axes=boxed,color=blue,thickness=2,labels=[x,f]):

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

 


 

Download AGM.mw

 

How to plot f(x)=x in the interval -2<x<2 with a period 4?

The plot should look like this


Hello all, first time posting on here so if I make any mistakes please let me know. So I have created a function called "g" and plotted it on a graph. After looking at the two graphs I have plotted (one with discont=false and one with discont=true), I can see 3 discontinuities are present. However, attempting to solve for these discontinuities by setting the denominator of "g" = 0 only returns 1 of the points. I'm not sure why this is happening and how would I go by solving for the other 2 points? Thank you.

f := exp(x-188.5)-4*x^2+1507.964*x-142122.3+cos(x)^2;

exp(x-188.5)-4*x^2+1507.964*x-142122.3+cos(x)^2

(1)

g := (-f+x^2-376.991*x+35530.6)/(f+x^2-376.991*x+35530.6);

(-exp(x-188.5)+5*x^2-1884.955*x+177652.9-cos(x)^2)/(exp(x-188.5)-3*x^2+1130.973*x-106591.7+cos(x)^2)

(2)

``

plot(g, x = 186 .. 194, y = -25 .. 25,discont=false)

 

plot(g, x = 186 .. 194, y = -25 .. 25,discont=true)

 

vasymp := fsolve( denom(g)=0);

192.2026966

(3)

``

After changing the time and date on my computer, I get a message saying “Invalid or missing license file.” whenever I try to open Maple. I have tried activating it with my license code. It then gives me a message saying “Activation succesful! Please restart Maple for the new license file to take effect.”. After opening it again, I will once again get the original message. I have also tried reinstalling it twice. One time with the file my school provides, and with a file from Maples website. I get the same error message no matter what I do. 

I haven't been able to access Maple for several weeks now, so I'm getting a bit behind in math class.

How should I go about fixing this?

Hi all,
I have a question about editing strings in Maple2016.
When I make a variable "DataName" which is as below in Maple worksheet,
DataName:=Array(["Data1","Data2","Data3"]):

I want to make the variable "DataSet" whose elements are as below.
DataSet:=[1="Data1",2="Data2",3="Data3"]

Of course I can type the elements of "DataSet", but if the number of DataName increases, it requires a lot of time to do that, so I want to make the "DataSet" by using general command so that I can obtain "DataSet" automatically.
I tried to use the command "cat", "||", "map", and so on... but I could not find how to do that.
Is there anyone who can solve this problem? Please let me know how to solve this problem. I appreciate any idea you may have.

Always thanks for the nice answer

hi..

is correct this answer for differential equations??

i think order of result should be in (10^6 or 10^9 or higher) range....

please check it

thanks

hpp.mw
 

restart

L := 100*10^(-9):

Eq1 := {-(1017/1600000000000000000000000000000000000000000)*(diff(w(x), x, x, x, x, x, x))+(26169/40000000000000000000000000)*(diff(w(x), x, x, x, x))-0.8325000000e-4*omega^2+1.560937500*10^(-21)*omega^2*(diff(w(x), x, x)), w(0) = 0, w(1/10000000) = 0, (D(w))(0) = 0, (D(w))(1/10000000) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(1/10000000) = 0}:

sys := subs(omega^2 = omega2, Eq1);

{-(1017/1600000000000000000000000000000000000000000)*(diff(diff(diff(diff(diff(diff(w(x), x), x), x), x), x), x))+(26169/40000000000000000000000000)*(diff(diff(diff(diff(w(x), x), x), x), x))-0.8325000000e-4*omega2+0.1560937500e-20*omega2*(diff(diff(w(x), x), x)), w(0) = 0, w(1/10000000) = 0, (D(w))(0) = 0, (D(w))(1/10000000) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(1/10000000) = 0}

 

{-(5085/8)*(diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y))+6542250*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.8325000000e-4*omega2+0.1560937500e-6*omega2*(diff(diff(g1(y), y), y)), 10000000*(D(g1))(0) = 0, 10000000*(D(g1))(1) = 0, 100000000000000*((D@@2)(g1))(0) = 0, 100000000000000*((D@@2)(g1))(1) = 0, g1(0) = 0, g1(1) = 0}

 

{-(5085/8)*(diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y))+6542250*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.8325000000e-4*omega2+0.1560937500e-6*omega2*(diff(diff(g1(y), y), y))}, {10000000*(D(g1))(0) = 0, 10000000*(D(g1))(1) = 0, 100000000000000*((D@@2)(g1))(0) = 0, 100000000000000*((D@@2)(g1))(1) = 0, g1(0) = 0, g1(1) = 0}

 

{g1(0) = 0, g1(1) = 0, (D(g1))(0) = 0, (D(g1))(1) = 0, ((D@@2)(g1))(0) = 0, ((D@@2)(g1))(1) = 0}

 

{diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y), diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), diff(diff(diff(diff(g1(y), y), y), y), y), diff(diff(diff(g1(y), y), y), y), diff(diff(g1(y), y), y), diff(g1(y), y)}

 

{-(1017/1600000000000000000000000000000000000000000)*(diff(diff(diff(diff(diff(diff(w(x), x), x), x), x), x), x))+(26169/40000000000000000000000000)*(diff(diff(diff(diff(w(x), x), x), x), x))-0.8325000000e-4*omega2+0.1560937500e-20*omega2*(diff(diff(w(x), x), x))}

 

{-(5085/8)*(diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y))+6542250*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.8325000000e-4*omega2+0.1560937500e-6*omega2*(diff(diff(g1(y), y), y))}

 

{diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y) = 10292.62537*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.1309734513e-6*omega2+0.2455752212e-9*omega2*(diff(diff(g1(y), y), y))}

 

{diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y) = 10292.62537*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.1309734513e13*omega3+2455752212.*omega3*(diff(diff(g1(y), y), y))}

 

{diff(diff(diff(diff(diff(diff(g1(y), y), y), y), y), y), y) = 10292.62537*(diff(diff(diff(diff(g1(y), y), y), y), y))-0.1309734513e13*omega3+2455752212.*omega3*(diff(diff(g1(y), y), y)), g1(0) = 0, g1(1) = 0, (D(g1))(0) = 0, (D(g1))(1) = 0, ((D@@2)(g1))(0) = 0, ((D@@2)(g1))(1) = 0}

 

{((D@@3)(g1))(0), ((D@@3)(g1))(1), ((D@@4)(g1))(0), ((D@@4)(g1))(1), ((D@@5)(g1))(0), ((D@@5)(g1))(1)}

 

((D@@3)(g1))(0)

 

((D@@3)(g1))(1)

 

((D@@4)(g1))(0)

 

((D@@4)(g1))(1)

 

((D@@5)(g1))(0)

 

((D@@5)(g1))(1)

 

((D@@5)(g1))(1), ((D@@4)(g1))(0), ((D@@5)(g1))(0), ((D@@3)(g1))(1), ((D@@4)(g1))(1), ((D@@3)(g1))(0)

 

HFloat(-8.852947665097804e-24), HFloat(-8.991820290300328e-22), HFloat(8.852947665097804e-24), HFloat(-9.672787782157173e-20), HFloat(-8.991820290300328e-22), HFloat(9.672787782157165e-20)

(1)

sqrt(8.85294766509780*10^(-21)*10^19);

.2975390338

(2)

NULL


 

Download hpp.mw

 

I have a data point set:

x_val:=<250,300,350,397,451,497,547,593,647,691,745,788,840,897>:
y_val:=<0,0.5,2,6.3,23.2,48.7,71.2,83.4,90.1,92.8,94.7,95.7,96.9,97.8>:

I want to make a least square fit using this difficult function:
 

function:=x->1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350))

but both Statistics[Fit]:
 

with(Statistics):fit_nelog:=Fit(1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350)),<x_val|y_val>,x,parameternames=[k,E],output=[parametervector,residualsumofsquares]);

and DirectSearch[DataFit]:

with(DirectSearch):fit_nelog2:=DataFit(1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350)),x_val,y_val,x,method=cdos);


give wrong k,E parameters. The correct parameter values were obtained with Excel Solver:

k=27843.3551042397

E=68.4

The approximately correct parameters were fitted when using logarithm form of the function.
How can I obtain correct parameter values in Maple using given form of the function?

Hello people in mapleprimes,
I have a question.
I appended two pictures where from the same code, two different orders of
expression appear.
How can I do for this so as not to get error messages?
The cause of this is simplify(%,symbolic) brings different order of term a__0^(-k)*F__D ahead of a parenthesis in a jpg.file and F__D*a__0^(-k) after
that parenthesis in another jpg.fine both in the line above that of  "dairihensu1."

In this case, What I can do?
Please help me.
Best wishes.

taro

my_code.mw

Original code is

e7_4:=F__D*(Omega+1)*beta/(beta-1) = F__I*a__D^(-k)*a__0^k+T^((sigma-k-1)/(-1+sigma))*F__D*phi^(k/(-1+sigma))+F__D;

a1:=beta=k/(sigma-1);
subs_free:=
  proc(a,b,c)
    local b1;
    b1:=isolate(b,c);
    subs(b1,a);
  end proc;
isolate(e7_4,a__D^(-k));simplify(%,symbolic);dairihensu1:=subs_free(%,a1,sigma);e7_5:=applyop(simplify,[2,4,1,3,2],dairihensu1);

A case without error.

A case with a error.

 

Pressure_loss.mw

Hey all, could someone pls help me with how i can setup the equation for f in my worksheet. It should look like v and Rey with 45 data points. I've tried alot but i can't seem to solve it mysefl. Is it because i solve and map at the same time?

Thanks

i wrote this problem to solve 

Delta= Sum(j=1 to n)SUM(i=j to n)(pi*hj/Ad(t,ij)*Et,ij))

Where n=70,  G= ftj (t)/(4+0.85*t) , where (t =8, 16, 24,…….up to 8*n), hj= 13 for all j except j1 =18

Ad= (Aj+s(mij-1)), where Aj varies

Mij=ES/E(G),          where E(G)= 57sqrt(1000*G)

 

n := 70;

70

(1)

i := seq(1 .. n, 1);

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70

(2)

t := proc (i) options operator, arrow; 8*i end proc;

proc (i) options operator, arrow; 8*i end proc

(3)

j := i;

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70

(4)

F = f(j);

F = f(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70)

(5)

F(1 .. 30) := 8;

8

(6)

F(31 .. 40) := 7;

7

(7)

F(41 .. 70) := 6;

6

(8)

G := proc (F, i) options operator, arrow; F*t/(4+.85*t) end proc;

proc (F, i) options operator, arrow; F*t/(4+.85*t) end proc

(9)

A := f(j);

f(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70)

(10)

A(1 .. 30) := 5184;

5184

(11)

A(31 .. 50) := 3600;

3600

(12)

A(51 .. 62) := 1936;

1936

(13)

A(63 .. 70) := 1024;

1024

(14)

s := f(j);

proc () option remember; table( [( 31 .. 50 ) = 3600, ( 63 .. 70 ) = 1024, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 1936, ( 31 .. 40 ) = 3600 ] ) 'procname(args)' end proc

(15)

s(1 .. 10) := 128.0448;

128.0448

(16)

s(11 .. 20) := 63.763;

63.763

(17)

s(21 .. 30) := 79.92;

79.92

(18)

s(31 .. 40) := 64.08;

64.08

(19)

s(41 .. 50) := 47.88:

s(51 .. 62) := 31.944;

31.944

(20)

s(63 .. 70) := 12.49;

12.49

(21)

E := proc (G) options operator, arrow; 57*sqrt(1000*F) end proc;

proc (G) options operator, arrow; 57*sqrt(1000*F) end proc

(22)

Es := 29000;

29000

(23)

m := proc (E) options operator, arrow; Es/E(G) end proc;

proc (E) options operator, arrow; Es/E(G) end proc

(24)

Ad := proc (j, m) options operator, arrow; A+s*(m(E)-1) end proc;

proc (j, m) options operator, arrow; A+s*(m(E)-1) end proc

(25)

P := f(j);

proc () option remember; table( [( 21 .. 30 ) = 79.92, ( 31 .. 50 ) = 3600, ( 41 .. 50 ) = 47.88, ( 63 .. 70 ) = 12.49, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 31.944, ( 11 .. 20 ) = 63.763, ( 31 .. 40 ) = 64.08, ( 1 .. 10 ) = 128.0448 ] ) 'procname(args)' end proc

(26)

P(1 .. 68) := 254.7;

254.7

(27)

P(69 .. 70) := 196.8;

196.8

(28)

h := f(j);

proc () option remember; table( [( 21 .. 30 ) = 79.92, ( 31 .. 50 ) = 3600, ( 41 .. 50 ) = 47.88, ( 63 .. 70 ) = 12.49, ( 1 .. 30 ) = 5184, ( 51 .. 62 ) = 31.944, ( 11 .. 20 ) = 63.763, ( 31 .. 40 ) = 64.08, ( 1 .. 10 ) = 128.0448 ] ) 'procname(args)' end proc

(29)

h(1) := 18;

18

(30)

h(2 .. 70) = 13;

h(2 .. 70) = 13

(31)

delta := sum(sum((P.h)/(E(G)*Ad)), i = 1 .. n, j = i)

Error, invalid input: sum uses a 2nd argument, k, which is missing

 

``


 

Download short.mw

Hello everyone,

I am trying to solve a system of ODE's numerically but the problem is with the condition f(0)+g(0)=1.

Here is the system with the initial conditions,

restart:
ode1:=diff(f(x), x,x)+(f(x)+g(x))*diff(f(x),x)=0;
ode2:=diff(g(x), x,x)+(f(x)+g(x))*diff(g(x),x)=0;
ics:=f(0)+g(0)=1,D(f)(0) =0,D(g)(0) =1;
dsolve({ode1,ode2,ics},numeric);

which give an error

Error, (in DEtools/convertsys) invalid specification of initial conditions

The above system is a simplified form of a very complicated one.

 

Hi

 

I have a maple file (saved as a workbook) which is saved in dropbox and has been saved during progress.  However, when I open the last version in maple, it opens a version which looks like it is some of the first versions. I have tried following things without success:

* Restore previous versions from dropbox and open them in maple.  No matter which version I open, it shows the same two lines of text.  In dropbox I can see all previous versions and their file size which all are different and increasing in size over time as more was added to the file.

* send the file to another computer and open in maple on that computer

 

Does anybody have the answer to what I can do/what the problem is?

Thanks!

 

/Katie

I am writing a package to define a few Records and collect some quantities and formulae to do some arithmetic with.

At some point I started running into a severe problem: Each time I want to use one of the exports form the module, the Maple kernel dies with a "Stack limit exceeded" message. The issue is: This seems to happen only on Maple 2016. I had some issues in Maple 2015 but that got sorted by rewriting some stuff. I never had any issue like that with Maple 15. I went as far as commenting out most of my .mapleinit code to make sure that did not cause issues. The code works as intended in Maple 15 and in Maple 2015.

I am posting this here and am asking others to see if they can reproduce this. Needless to say I will SCR this. But I actually need to get this to work.

The error can be triggered by simply entering

Booster;

after loading the package. Needless to say, it should just echo the name "Booster", to get more one would need to enter eval(Booster) (due to the last-name evaluation rules).

Thanks,

M.D.

BooMBA.mw

For remainder of division of a (multivariable) polynomial to several polynomials at a same time one can use NormalForm in Maple. It is easy to write a procedure to also show the division but I wonder if there is any determined command such as NormalForm for this aim?

Hej all,

I have a problem. When i have a 9-1 vector "DD" how can i get maple to solve DD^2 my equation is A=(pi/4)*DD^2 should be simple.

 

Also when i have two vectors one is 9-1 and the other is 5-1 i want to divide the 5-1 / 9-1 but i want all possible soluitons? not just 5 results but 45 results.(the zip fuction only gives me 5 results)

 

Pls help 

 

Kind regards

First 42 43 44 45 46 47 48 Last Page 44 of 60