Maple 2016 Questions and Posts

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

Can you help me

myproc := proc () local img1, img2, img3;

with(DocumentTools); with(DocumentTools:-Layout);

img1 := "c:\\1.jpg"; img2 := "c:\\2.jpg"; img3 := "c:\\3.jpg";

print("Title 1 row 1, picture 1"); print(img1); print("Title 2 row 2, picture 2");

print(img2); print("Title 3 row 3, picture 3"); print(img3);

print("The End");

end proc

``

myproc := proc () local img1, img2, img3; with(DocumentTools); with(DocumentTools:-Layout); img1 := "c:\\1.jpg"; img2 := "c:\\2.jpg"; img3 := "c:\\3.jpg"; print("Title 1 row 1, picture 1"); print(img1); print("Title 2 row 2, picture 2"); print(img2); print("Title 3 row 3, picture 3"); print(img3); print("The End") end proc:

``


 

Download insert_picture.mw

print monitor

 

Can someone please explain to me why this occurs:

 


 

with(StringTools):

Join(["H:\\USB 1 BACKUP\\ESD-USB\\", "Chemical Engineering"])

"H:\USB 1 BACKUP\ESD-USB\ Chemical Engineering"

(1)

convert("H:\\USB 1 BACKUP\\ESD-USB\\ Chemical Engineering", 'symbol')

`H:\USB 1 BACKUP\ESD-USB\ Chemical Engineering`

(2)

convert('`H:\USB 1 BACKUP\ESD-USB\ Chemical Engineering`', 'string')

"H:USB 1 BACKUPESD-USBChemical Engineering"

(3)

``


 

Download this_makes_me_grumpy.mw

Hello,

I am trying to solve a set of coupled ODEs in the following code (ODE_Prob.mw). But I am getting an error.

Please, what does this error mean and what is the solution.

Thanks in advance. 
 

restart; PDEtools[declare](f(eta), prime = eta, theta(eta), prime = eta); Digits := 16; inf := 9

f(eta)*`will now be displayed as`*f

 

`derivatives with respect to`*eta*`of functions of one variable will now be displayed with '`

 

theta(eta)*`will now be displayed as`*theta

(1)

equ1 := (2*n+1)*f(eta)*(diff(theta(eta), eta))/(2*(n+1)) = (diff(theta(eta), eta, eta))/Pr^(2/(n+1))

(2*n+1)*f(eta)*(diff(theta(eta), eta))/(2*n+2) = (diff(diff(theta(eta), eta), eta))/Pr^(2/(n+1))

(2)

equ2 := (1/2)*(diff(f(eta), eta))^2-(2*n+1)*f(eta)*(diff(f(eta), eta, eta))/(2*n+2) = -n*(diff(f(eta), eta, eta))^(n-1)*(diff(f(eta), eta, eta, eta))+theta(eta)

(1/2)*(diff(f(eta), eta))^2-(2*n+1)*f(eta)*(diff(diff(f(eta), eta), eta))/(2*n+2) = -n*(diff(diff(f(eta), eta), eta))^(n-1)*(diff(diff(diff(f(eta), eta), eta), eta))+theta(eta)

(3)

indets(equ1);

{Pr, eta, n, Pr^(2/(n+1)), diff(diff(theta(eta), eta), eta), diff(theta(eta), eta), f(eta), theta(eta)}

 

{eta, n, (diff(diff(f(eta), eta), eta))^(n-1), diff(diff(diff(f(eta), eta), eta), eta), diff(diff(f(eta), eta), eta), diff(f(eta), eta), f(eta), theta(eta)}

(4)

Bcs := f(0) = 0, (D(f))(0) = 0, (D(f))(inf) = 1, theta(0) = 1, theta(inf) = 0;

f(0) = 0, (D(f))(0) = 0, (D(f))(9) = 1, theta(0) = 1, theta(9) = 0

 

1.301763965

 

1.4

(5)

equ1;

.7916666666666667*f(eta)*(diff(theta(eta), eta)) = .8027059130737796*(diff(diff(theta(eta), eta), eta))

 

(1/2)*(diff(f(eta), eta))^2-.7916666666666667*f(eta)*(diff(diff(f(eta), eta), eta)) = -1.4*(diff(diff(f(eta), eta), eta))^.4*(diff(diff(diff(f(eta), eta), eta), eta))+theta(eta)

(6)

SolP1 := dsolve({Bcs, equ1, equ2}, numeric); SolP1(0); SolP1(inf)

Error, (in dsolve/numeric/BVPSolve) unable to store '-.4744942626692375+1.460343180701223*I' when datatype=sfloat

 

SolP1(0)

 

SolP1(9)

(7)

p1 := plots:-odeplot(SolP1, [eta, f(eta)], 0 .. inf); p2 := plots:-odeplot(SolP1, [eta, theta(eta)], 0 .. inf); p3 := plots:-odeplot(SolP1, [eta, diff(f(eta), eta)], 0 .. inf); plots:-display(Array([p1, p2, p3]))

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

Error, (in plots:-display) element 1 of the rtable is not a valid plot structure

 

``


 

Download ODE_Prob.mw

 

The uploaded worksheet describes a mechanics scenario which I would like to animate.

While I understand the expression for the kinetic energy of the torus, the term containing cos(theta) within the expression for the KE of the pearl baffles me.

From which physics aspect of the scenario does this term derive?

Pearl_in_torus.mw


 

eq := solve({2*m-5 < 0, -3*m <= 5}, {m})

{-5/3 <= m, m < 5/2}

(1)

" implies result list m  in  `&Zopf;`, so m can m=0, m=1, m=2 and count=3"``

count := 0:

countt = 4

(2)

``

``

``

eq := solve({m-3 < 0, -m <= 6}, {m})

{-6 <= m, m < 3}

(3)

" implies result list m  in  `&Zopf;`, so m can m=-6, m=-5, m=-4, m=-3, m=-2, m=-1, m=0, m=1, m=2 and count=3"

count := 0:

countt = 9

(4)

``


i want to list variable m in integer number from solve?

Can you help me?

@acer

@Carl Love

Download help_list_integer_equation.mw

Hello, i'm doing an interface for LU decomposition. I need to do a multiple windows interface using maplets, and i want to click one button on the inicial interface to open another window with other interface. I also need to create the second interface having N TextFields (N value will be inserted on the first window). Somebody knows how to do it?

Hello,

I'm new to Maple, but somewhat competent in computer mathematics. Below is some code that I wrote. I start off with f, my original function, and try to simplify it. I tried defining some assumptions as best I could. When I calculate the integral, it gives me an odd range of validity.

I'm wondering if I can further add to my assumptions to make the integral result more concise, i.e. without the piecewise range of validity. All my variables in f and g are already real and positive, so there is no reason one of the expressions should be less than zero. 

Thank you in advance for any insight.

 flat-geometry_recalc_Aug20_singleS.mw
 

f := (Pi*x+2*c+2*m)/(mu__c*S)+2*epsilon/(mu__a*S)+(Pi*x+2*c)/(mu__s*S)

(Pi*x+2*c+2*m)/(mu__c*S)+2*epsilon/(mu__a*S)+(Pi*x+2*c)/(mu__s*S)

(1)

g := simplify(f, symbolic)

(((Pi*x+2*c+2*m)*mu__s+2*((1/2)*Pi*x+c)*mu__c)*mu__a+2*epsilon*mu__c*mu__s)/(mu__c*S*mu__a*mu__s)

(2)

`assuming`([g], [S__s::positive]); 1; S__c::positive, S__a::positive, epsilon::positive, mu__s::positive, mu__c::positive, mu__a::positive, c::positive, m::positive

S__c::positive, S__a::positive, epsilon::positive, mu__s::positive, mu__c::positive, mu__a::positive, c::positive, m::positive

(3)

int(1/g, x = 0 .. w, AllSolutions)

`assuming`([int(1/g, x = 0 .. w)], [0 < w])

piecewise(And((c*mu__a*mu__c+c*mu__a*mu__s+epsilon*mu__c*mu__s+m*mu__a*mu__s)/(mu__a*(mu__c+mu__s)) < 0, -2*(c*mu__a*mu__c+c*mu__a*mu__s+epsilon*mu__c*mu__s+m*mu__a*mu__s)/(Pi*mu__a*(mu__c+mu__s)) < w), undefined, mu__s*S*mu__c*(-ln(2)-ln(c*mu__a*mu__c+c*mu__a*mu__s+epsilon*mu__c*mu__s+m*mu__a*mu__s)+ln(Pi*mu__a*mu__c*w+Pi*mu__a*mu__s*w+2*c*mu__a*mu__c+2*c*mu__a*mu__s+2*epsilon*mu__c*mu__s+2*m*mu__a*mu__s))/(Pi*(mu__c+mu__s)))``

(4)

 

NULL


 

Download flat-geometry_recalc_Aug20_singleS.mw

 

Hello!

I recently began learning how to 3D print with maple using the "Export & .stl " command together.

I was wondering if anyone knew how to increase the surface thickness for parametric plots and implicit plots. My hope would be to increase the "extrusion level" so to say.

I came across:

https://www.mapleprimes.com/questions/134103-Plotting-3d-Surfaces-With-A-Thickness

But I am not sure how to extend this idea to a parametric surface or an implict surface.

 

One more quick tidbit is that I will be trying to print several surfaces arising in differential geometry and algebraic geometry. Severel of these surfaces are open and or have singularities that I would like to "smooth out."

 

I would love to hear any ideas and thanks!

Hello,

I am trying to define a statespace object. Here my code reads:

with(DynamicSystems):

 

aSys≔StateSpace(⟨⟨1,2⟩∣∣⟨3,4⟩⟩,⟨⟨2,3⟩⟩,⟨⟨1,0⟩∣∣⟨0,1⟩⟩,⟨⟨0,0⟩⟩):

Error, (in DynamicSystems:-StateSpace) unsupported type of index, t

I do not have any clue what is wrong with my code.

 

Any help will be really appreciated.

Thanks

I want to extract lists that are term by term smaller than a fix one.

To be clearer, I want to create something like

if a[i] <= b[i] for all i=1..min(nops(a),nops(b)) then ...

I tried with the forall call, but it doesn't work:

if forall( i=1..min(nops(a),nops(b)),a[i] <= b[i]) then ...
 

I also tried the assuming call with the is call. It works, but doesnt't give me the result I want:

 

if is(a[i] <= b[i]) assuming(1 <= i, i <= min(nops(a),nops(b))) then...

Is there a way to have a chain of conditions in a if statement like I am trying to do?

1. y''(x)+10y(x)=99sin(x), y(0)=1, y'(0)=11 in the interval [0,100]

the exact solution is y(x)=cos(10x)+sin(10x)+sin(x)

 

2. y'=z, y(0)=1

    z'=-y(x)+x, z(0)=2

    the exact solutions are y(x)=cos(x)+sin(x)+x, z(x)=cos(x)-sin(10x)+1

 

The worksheet below animates the flattening of a tetrahedron by expanding one of its faces, namely its triangular base.

I would like to animate the flattening of an octahedron so that it assumes the 2D figure resembling the Morley triangle which is included in the worksheet.

Are there documents on the web explaining the technique for doing so? Is there a Maple worksheet available on the web demonstrating the desired animation?

Flatten_a_tetrahedron.mw

Hi, my codes ran smoothly well until I changed some assignment value. It reported invalid object error.

Error, Got internal error in Typesetting:-Parse:-Postprocess : "internal error: invalid object "

Part of the codes are as follows:

""sigma:=0.00002:    m:=5:   n:=4:
Error, Got internal error in Typesetting:-Parse:-Postprocess : "internal error: invalid object "

Could anyone give some hints on what goes wrong here? It seems to be a configuration issue but I completely have no clue..

Thanks a million in advance,

Best,

Jie

 

 

    

please where is the problem 

with(DEtools);

eq1 := (D(x))(t) = -y(t);

eq2 := (D(y))(t) = x(t)+2*x(t)^3-signum(z(t));

eq3 := (D(z))(t) = w(t);

eq4 := (D(w))(t) = -z(t)*(1+6*x(t)^2);

sys := eq1, eq2, eq3, eq4;

ic1 := [x(0) = 0, y(0) = 0, z(0) = cos(1), w(0) = sin(1)];

ic2 := [x(0) = 0, y(0) = 0, z(0) = cos(2.5), w(0) = sin(2.5)];

ic := ic1, ic2;

DEplot([sys], [x(t), y(t), z(t), w(t)], t = 0 .. 10, [ic], stepsize = 0.5e-1, scene = [x(t), y(t)], linecolor = [blue, red]);

sol1:=dsolve({sys,x(0)=0,y(0)=0,z(0)=cos(1),w(0)=sin(1)},{x(t),y(t),z(t),w(t)},type=numeric);

T := 10.0 ; N := 100 ; h := T/N;

xk := 0;

for k from 1 to N do

 solk := sol1(k*h);

  xknew := subs(solk,x(t));

 yknew := subs(solk,y(t));

 if xk*xknew<=0 and abs(yknew-6)<0.5 then break fi;

 xk := xknew;

od; sol1(k*h);

temps := proc(alpha,eps)

local sol,solk,T,N,h,k,xk,xknew,yknew,t0,t1,tm,x0,x1,xm;

sol := dsolve({sys,x(0)=0,y(0)=0,z(0)=cos(alpha),w(0)=sin(alpha)},{x(t),y(t),z(t),w(t)},type=numeric);

T := 10.0 ; N := 100 ; h := T/N;

xk := 0;

for k from 1 to N do

 solk := sol(k*h);

  xknew := subs(solk,x(t));

 yknew := subs(solk,y(t));

 if xk*xknew<=0 and abs(yknew-6)<0.5 then break fi;

 xk := xknew;

od; 

t0 := (k-1)*h ; t1 := k*h ;

x0 := subs(sol(t0),x(t)) ; x1 := subs(sol(t1),x(t)) ;

while abs(x0-x1)>eps do

 tm := (t0+t1)/2;

 xm := subs(sol(tm),x(t));

 if xm*x0<0 then x1 := xm; t1:=tm;

            else x0 := xm; t0:=tm;

 fi;

od;

RETURN(t0);

end;

 

dicho := proc(eps)

local a,b,m,sola,solb,solm,ta,tb,tm,ya,yb,ym;

a := 1 ; b := 2.5 ;

sola := dsolve({sys,x(0)=0,y(0)=0,z(0)=cos(a),w(0)=sin(a)},{x(t),y(t),z(t),w(t)},type=numeric);

solb := dsolve({sys,x(0)=0,y(0)=0,z(0)=cos(b),w(0)=sin(b)},{x(t),y(t),z(t),w(t)},type=numeric);

ta := temps(a,eps) ; tb := temps(b,eps) ;

ya := subs(sola(ta),y(t)) ; yb := subs(solb(tb),y(t)) ;

while abs(yb-ya)>eps do

m := evalf((a+b)/2);

solm := dsolve({sys,x(0)=0,y(0)=0,z(0)=cos(m),w(0)=sin(m)},{x(t),y(t),z(t),w(t)},type=numeric);

tm := temps(m,eps) ;

yb := subs(sol(tm),y(t));

 if (ym-6)*(ya-6)<0 then b := m; yb := ym;

            else a := m; ya := ym;

 fi;

od;

RETURN(a);

end;

dicho(0.01);

2.136718750

temps(2.136718750,0.01);

8.737500000

DEplot([sys], [x(t), y(t), z(t), w(t)], t = 0 .. 8.7375, [[x(0)=0,y(0)=0,z(0)=cos(2.136718750),w(0)=sin(2.136718750)]], stepsize = 0.5e-1, scene = [x(t), y(t)], linecolor = [blue]);

 

 

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

1 2 3 4 5 6 7 Last Page 1 of 51