Maple 2018 Questions and Posts

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

Consider the equation  (2^x)*(27^(1/x)) = 24  for which we need to find the exact values ​​of its real roots. This is not difficult to solve by hand if you first take the logarithm of this equation to any base, after which the problem is reduced to solving a quadratic equation. But the  solve  command fails to solve this equation and returns the result in RootOf form. The problem is solved if we first ask Maple to take the logarithm of the equation. I wonder if the latest versions of Maple also do not directly address the problem?

restart;
Eq:=2^x*27^(1/x)=24:
solve(Eq, x, explicit);

map(ln, Eq); # Taking the logarithm of the equation
solve(%, x);
simplify({%}); # The final result

                  

 

How to get the animation graphs for eta =0..10

NULL

restart; with(plots)

``

ga := .2; Gc := .2; n := 2; Sc := .5; Kp := .2; Q := 0.5e-1; Gr := .2

A := .1Pr := 6.2; Nt := .2; alpha := .1; Rd := 1.5; M := .5; E1 := .3; Ec := .3; Thetap := .2; Nb := .2

NULL

a1 := 1.301348831
NULL

a2 := 1.298194584
a3 := .9728927630; a4 := .9161173998

a5 := 1.316893419

a6 := 1.333333333

 

 

OdeSys := a1*((diff(f(eta), eta, eta, eta))*(2*eta*ga+1)+2*(diff(f(eta), eta, eta))*ga)/a2+A^2-(diff(f(eta), eta))^2+f(eta)*(diff(f(eta), eta, eta))-a1*Kp*(diff(f(eta), eta))/a2-a6*M*(diff(f(eta), eta))/a2+a4*(Theta(eta)*Gr+Phi(eta)*Gc)/a2, f(eta)*(diff(Theta(eta), eta))+a5*(1+4*Rd*(1/3))*((diff(Theta(eta), eta, eta))*(2*eta*ga+1)+2*(diff(Theta(eta), eta))*ga)/(a3*Pr)+(diff(f(eta), eta, eta))^2*(2*eta*ga+1)*Ec*a1/a3+Theta(eta)*Q/a3, f(eta)*(diff(Phi(eta), eta))+((diff(Phi(eta), eta, eta))*(2*eta*ga+1)+2*(diff(Phi(eta), eta))*ga)/Sc+Nt*((diff(Theta(eta), eta, eta))*(2*eta*ga+1)+2*(diff(Theta(eta), eta))*ga)/(Nb*Sc)-Kr*(1+Theta(eta)*(Thetap-1))^n*exp(-E1/(1+Theta(eta)*(Thetap-1))); Cond := f(0) = 0, (D(f))(0) = 1, a5*(D(Theta))(0) = -alpha*(Theta(0)-1), Phi(0) = 1, (D(f))(10) = A, Theta(10) = 0, Phi(10) = 0

KrVals := [0.1e-1, .1, .2, .3]

for j to numelems(KrVals) do Ans[j] := dsolve(eval([OdeSys, Cond], Kr = KrVals[j]), numeric, output = listprocedure) end do

``

``

with(plots):
  cols := [red, blue,green, black]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,D(f)(eta)],
          eta=0..10,
          color=cols[k]
        ),
        k=1..numelems(KrVals)
      )
    ],
    'axes'= 'boxed',labels=[eta,'f(eta)']
  );

 

with(plots):
  cols := [red, blue, green,black]:

plotC:= display( [ seq( odeplot
        ( Ans[k],[eta,Theta(eta)],
          eta=0..10,
          color=cols[k]
        ),
        k=1..numelems(KrVals)
      )
    ],
    'axes'= 'boxed',labels=[eta,'Theta(eta)']
  );

 

 

``

plotA1 := display(seq(plot3d(r*(eval(f(:-eta), Ans[k]))(eta), eta = 0 .. 10, r = -5 .. 5, color = cols[k]), k = 1 .. nops(KrVals)), linestyle = "solid", style = contour, thickness = 1)

 
 

 

Download ode_plots_animation_graphs.mw

i need like this demo plot  

Download Ode_New_TWO_phase.mw

I want like this plots here two phase are there boundary is -2 to0 and 0 to 2

f(±2)=0,g(±2)=0,f(0)=1,h(±2)=1,H(±2)=1

Is it possible to simplify the following relatively simple expression  (10*(5+sqrt(41)))/(sqrt(70+10*sqrt(41))*sqrt(130+10*sqrt(41)))  using 1-2 standard commands  simplify , combine, radnormal  and so on?   I was unable to do this in Maple 2018. Maybe newer versions of Maple will be able to handle this. I managed to simplify it in 3 steps:

expr:=(10*(5+sqrt(41)))/(sqrt(70+10*sqrt(41))*sqrt(130+10*sqrt(41)));
sqrt(simplify(expr^2));

                              

Please Help me to solve this problem 
 

Download ode_Plots_error.mw

exact_solution_error.mw

P1=(D1*ga+C1)/(1+ga) and P2= (D1-C1)/(1+ga), How to substitute in the solution of U_exact and Theta_exact

Please help me to solve

Dear sir ,

I have implemented Dsolve method the code was executed, but i need to apply Kellor Box method to solve the ODES 

Please can any one help how to implement? 

because there is no post regarding the Kellor box method. 

restart; with(plots)

``

S := 1; Rd := .1; delta := .1; Hs := 1; Sc := .1; Pr := 6.8; n := 1; Rc := .1; E := .1; M := 1

NULL

 

OdeSys := a1*(diff(f(eta), eta, eta, eta, eta))/a2-S*(3*(diff(f(eta), eta, eta))+eta*(diff(f(eta), eta, eta, eta))+(diff(f(eta), eta))*(diff(f(eta), eta, eta))-f(eta)*(diff(f(eta), eta, eta, eta)))-a5*M*(diff(f(eta), eta, eta))/a2-a1*Kp*(diff(f(eta), eta, eta))/a2 = 0, (a4+4*Rd)*(diff(Theta(eta), eta, eta))+12*Rd*delta*((diff(Theta(eta), eta))*(diff(Theta(eta), eta))+Theta(eta)*(diff(Theta(eta), eta, eta)))+Hs*Theta(eta)-a3*Pr*S*(diff(Theta(eta), eta))*(eta-f(eta)) = 0, diff(Phi(eta), eta, eta)-S*Sc*(diff(Phi(eta), eta))*(eta-f(eta))-Sc*Rc*(1+delta*Theta(eta))^n*Phi(eta)*exp(-E/(1+delta*Theta(eta))) = 0; Cond := f(0) = 0, ((D@@2)(f))(0) = 0, (D(Theta))(0) = 0, (D(Phi))(0) = 0, f(1) = 1, (D(f))(1) = 0, Theta(1) = 1, Phi(1) = 1

   

KpVals := [1, 2, 3, 4]

for j to numelems(KpVals) do Ans[j] := dsolve(eval([OdeSys, Cond], Kp = KpVals[j]), numeric, output = listprocedure) end do

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(f(eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'f(eta)'],labelfont=[TIMES,BOLD,16]
  );
 

with(plots):
  cols := [red, blue, black,green]:

plotB:= display( [ seq( odeplot
        ( Ans[k],[eta,Theta(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

 

with(plots):
  cols := [red, blue, black,green]:

plotC:= display( [ seq( odeplot
        ( Ans[k],[eta,Phi(eta)],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,'Phi(eta)'],labelfont=[TIMES,BOLD,16]
  );

 

with(plots):
 cols := [red, blue, black,green]:

 plotA:= display
  ( [ seq
      ( odeplot
        ( Ans[k],[eta,(diff(f(eta),eta))],
          eta=0..1,
          color=cols[k]
        ),
        k=1..numelems(KpVals)
      )
    ],linestyle = "solid",
    'axes'= 'boxed',labels=[eta,"f '(eta)"],labelfont=[TIMES,BOLD,16]
  );

 

 

 

Download kellor_box_method.mw

Hi,
I have a problem and I haven't been able to solve it yet. I want to solve an ordinary diffrential equation similar to
                                                                                                   (dphi/dxi)^2+2*V(phi)=0
and plot phi versus xi for a the following conditions:
1) V(phi)=dphi/dxi=0 at (phi=0,phi_m) and
2) dV(phi)/dphi=0 at phi=phi_m and 
3) d^2V(phi)/dphi^2=0 at both phi=0 and phi=phi_m.
How can I do this by Maple?(see the attached file)
w1.mw

If we solve the equation  x^x=1/sqrt(2)  in Maple 2018.2, then Maple returns only one solution  x=1/2 , although this equation has 2 solutions  x=1/2  or  x=1/4 . This can be seen if you plot graphs or , for example, solve by the  Student:-Calculus1:-Roots  command. In this case, the root  x=1/4   is returned only as a numerical approximation. I wonder if this bug has been fixed in the latest versions of Maple?

restart;
solve(x^x=1/sqrt(2));
Student:-Calculus1:-Roots(x^x=1/sqrt(2));

sachi_stream_error_3d.mw  3d_sachin_p1.mw

Dear sir, there is something missing why it is not able to evaluate?

By reference of some posts I have implemented to my ODE but not getting the graph.

what is the mistake in both files?

How to solve this type of ode in maple

need the value of S, Q, E

Good day.

I am working on a time series problem that uses 107 data sets (historic) and I wish to obtain a forecast for the next successive 12 events. I have obtained the time series plot for the predicted values and the associated dates separately (see attached), however - I am looking to get the solution in a more user-friendly format and was hoping someone could help me out.

Can someone tell me how to 

1. Express the data values only as whole number values (decimal-free)

2. Construct a table of data values and dates for the average forecast as well as the 2nd and 98th percentile forecasts?

Thanks for reading!

MaplePrimes_TS_Example.mw

I'd like to use Maple to make measurements on a map (Dealey Plaza). I can load an image in Sketcher and draw lines on it, but can't figure out how to access the lengths of those lines.

restart``

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plottools); with(plots); with(Threads); with(MmaTranslator[Mma]), with(StringTools); with(CodeGeneration); VectorCalculus:-`*`(Setup(mathematicalnotation = true), Setup(coordinatesystems = cartesian))

estart

 

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}

(1)

``

``

NULL

 

``

``

Download DealeyPlazaToo.mw

Hi,
I have a function (see attached file).  How can I find by Maple 
those values of beta and f for which W will have 
three consecutive local extrema between the
phi=0 and phi_0 where W=dW/dphi=0 at phi=0 and W=0 at phi_0 and W<0 for 0<abs(phi)<phi_0?
Thanks,
plot.mw

Using Maple-18 on Window 11...

I have a set of curves in a Maple 'vector.' I want to plot them all on the same figure, but if call 'display' with the vector it makes separate plots for each one. I have to all it with each plot individual to get them on the same plot:

lc is a 'vector' of curves (I use 'vector' because I want to append and that doesn't work for 'list')

display(lc) -- plots a separate plot for each element of lc

display(lc[1], lc[2], lc[3],...) puts them all on one plot as needed, but as there will be a large numbe of curvesr it's extremely tedious.

It is a Huygens principle based simulation of diffraction.

restart

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plots); with(plottools); with(Threads); with(MmaTranslator[Mma]), with(StringTools); with(CodeGeneration); with(ImageTools); with(ImageTools:-Draw); VectorCalculus:-`*`(Setup(mathematicalnotation = true), Setup(coordinatesystems = cartesian))

estart

 

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}

(1)

NULL

NULL

 

radius := 1.0

1.0

(2)

NULL

NULL

``

NULL

alpha := sin((1/4)*Pi)

(1/2)*2^(1/2)

(3)

step := .2

.2

(4)

radius := 100.0

100.0

(5)

l1 := line([0, 0], [100, 100])

CURVES([[0., 0.], [100., 100.]])

(6)

loAng := 0.

0.

(7)

hiAng := (1/2)*Pi

(1/2)*Pi

(8)

c1 := arc([0, 0.], radius, loAng .. Pi, color = "red")

c2 := arc([step, 0.], -alpha*step+radius, loAng .. hiAng, color = "blue")

c3 := arc([2*step, 0.], -2*alpha*step+radius, loAng .. Pi, color = "purple")

c4 := arc([3*step, 0.], -3*alpha*step+radius, loAng .. Pi, color = "black")

plots[display](l1, c1, c2, c3, c4, view = [0. .. radius, 0 .. radius])

 

`cir&Assign;arc`([x, 0.], radius-step, loAng .. hiAng, i, color = "red")

`cir&Assign;arc`([x, 0.], 99.8, 0. .. (1/2)*Pi, i, color = "red")

(9)

``

xLimitWall := 500.0; nScatter := 20; step := xLimitWall/(nScatter+1); x := 0.; for i from 0 to nScatter do x := x+step; cir := arc([x, 0.], radius-step, 0 .. Pi, color = "red"); if i = 0 then lc := Vector([cir]) else i; cir; Append(lc, cir) end if end do; lc

xLimitWall := 500.0

 

nScatter := 20

 

step := 23.80952381

 

x := 0.

 

x := 23.80952381

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 47.61904762

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 71.42857143

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 95.23809524

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 119.0476190

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 142.8571428

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 166.6666666

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 190.4761904

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 214.2857142

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 238.0952380

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 261.9047618

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 285.7142856

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 309.5238094

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 333.3333332

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 357.1428570

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 380.9523808

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 404.7619046

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 428.5714284

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 452.3809522

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 476.1904760

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

x := 499.9999998

 

cir := CURVES(Vector(4, {(1) = ` 200 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order}), COLOUR(RGB, 1.00000000, 0., 0.))

 

Vector[column](%id = 4400555778)

(10)

lc[1]

CURVES(Matrix(%id = 4400554242), COLOUR(RGB, 1.00000000, 0., 0.))

(11)

lc(2)

``

lc

lc[1]

``

Download JFKWEdgeDifractionDirection.mwJFKWEdgeDifractionDirection.mwen.

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