Maple 18 Questions and Posts

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

In Physics package there is this compact notation X=(t,x,y,z)

Is there something similar in the VectorCalculus packge?

For example

restart;

with(VectorCalculus);

SetCoordinates(cartesian[x, y, z]);

v := VectorField([vx, vy, vz]);

Jacobian(v);

 

I don't explicitly want to write the arguments (x,y,z) of the functions vx,vy,vz everytime.

untit.mw

 



 

These files contain the kinematics and dynamics of the solid using a new technique (ALT + ENTER) to visualize the results online and thus save space in our Maple worksheet. Seen from a relative approach. For engineering students. In Spanish.

Equations_of_movement_for_particle.mw  (Intro)

Kinematics_and_relative_dynamics_of_a_solid.mw

Flat_kinetic_of_a_rigid_body.mw

Lenin Araujo Castillo

Ambassador of Maple

The video shows the curvilinear components of acceleration in polar coordinates, radial and tangential scalar components. Applied to a structure; in a time interval; to finally be graphed and interpreted. For engineering students.

Speed_and_Acceleration_with_Cylindrical_Components.mw

Lenin Araujo Castillo

Ambassador of Maple

restart;
N:=4;alpha:=5*3.14/180;r:=10;Ha:=5;H:=1;
dsolve(diff(f(x),x,x,x));
Rf:=diff(f[m-1](x),x,x,x)+2*alpha*r*sum*(f[m-1-n](x)*diff(f[n](x),x),n=0..m-1)
+(4-Ha)*(alpha)^2*diff(f[m-1](x),x);
dsolve(diff(f[m](x),x,x,x)-CHI[m]*(diff(f[m-1](x),x,x,x))=h*H*Rf,f[m](x));
f[0](x):=1-x^2;
for m from 1 by 1 to N do
CHI[m]:='if'(m>1,1,0);
f[m](x):=int(int(int(CHI[m]*(diff(f[m-1](x),x,x,x))+h*H(diff(f[m-1](x),x,x,x))
+2*h*H*alpha*r*(sum(f[m-1-n](x)*(diff(f[n](x),x)),n=0..m-1))+4*h*H*alpha^2*
(diff(f[m-1](x),x))-h*H*alpha^2*(diff(f[m-1](x),x))*Ha,x),x)+_C1*x,x)+_C2*x+_C3;
s1:=evalf(subs(x=0,f[m](x)))=0;
s2:=evalf(subs(x=0,diff(f[m](x),x)))=0;
s1:=evalf(subs(x=1,f[m](x)))=0;
s:={s1,s2,s3}:
f[m](x):=simplify(subs(solve(s,{_C1,_C2,_C3}),f[m](x)));
end do;
f(x):=sum(f[1](x),1=0..N);
hh:=evalf(subs(x=1,diff(f(x),x))):
plot(hh,h=-1.5..-0.2);
A(x):=subs(h=-0.9,f(x));
plot(A(x),x=0..1);

hello! i have a problem about DEplot. can some of you help me to solve this problem? I use Maple 18. here the problem I've

restart;
with(DEtools);
 
>DE3:={diff(y(x),x)=y(x)-z(x),diff(z(x),x)=z(x)-2*y(x)};    
>DEplot(DE3,[y(x),z(x)],x=0..3,y=0..2,z=-4..4,arrows=large);

   when i enter it, I dont get the graphic. can you tell me why? thank you!


 

``

lambda[1] := .3:

evalf(int(2*alpha^2*Z*exp(lambda[1]*Z)/((exp(lambda[1]*Z)-1+alpha)^2*(exp(lambda[2]*Z)-1+alpha)), Z = 0 .. infinity))

Float(undefined)

(1)

``


 

Download aquestion.mw

Dear Maple primes,

Could you, please, help me with numerical solution of an ODE?

The ODE looks like this

dz/dx = f1(x,z) + f2(z)

where f1(x,z) is some simple function of x and z (that does not create any problem), but f2(z) is given as

f2(z) = int(f3(t), t = z1..z2)

The problem appears, when the integral cannot be solved analytically.

Below is an example of the problem (here I chose the function f3(t)= tt as well as other functions, intervals and initial condition only for the sake of illustration of the problem):

restart; with(plots)

INT := Int(t^t, t = .1 .. z(x), method = _DEFAULT)

eq1 := {diff(z(x), x) = x+z(x)+INT, z(.1) = .1}

plot1 := dsolve(eq1, type = numeric, range = .1 .. 1)

odeplot(plot1)


Download z-for_primes_dsolve.mw

Thank you in advance!

Max

restart; with(plots);
[animate, animate3d, animatecurve, arrow, changecoords, 

  complexplot, complexplot3d, conformal, conformal3d, 

  contourplot, contourplot3d, coordplot, coordplot3d, 

  densityplot, display, dualaxisplot, fieldplot, fieldplot3d, 

  gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, 

  interactive, interactiveparams, intersectplot, listcontplot, 

  listcontplot3d, listdensityplot, listplot, listplot3d, 

  loglogplot, logplot, matrixplot, multiple, odeplot, pareto, 

  plotcompare, pointplot, pointplot3d, polarplot, polygonplot, 

  polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, 

  semilogplot, setcolors, setoptions, setoptions3d, spacecurve, 

  sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]


fixedparameter1 := [n = .3, W[e] = .3, M = .2, gamma = 1, delta = -1, N[r] = .8, Pr = .72, Nb = .5, Nt = .5, Bi = 2, Pr = .72, Le = 5];
[n = 0.3, W[e] = 0.3, M = 0.2, gamma = 1, delta = -1, N[r] = 0.8, 

  Pr = 0.72, Nb = 0.5, Nt = 0.5, Bi = 2, Pr = 0.72, Le = 5]


eq1 := (1-n)*(diff(f(eta), eta, eta, eta))+f(eta)*(diff(f(eta), eta, eta))-M*(diff(f(eta), eta))+n*W[e]*(diff(f(eta), eta, eta, eta))*(diff(f(eta), eta, eta)) = 0;
        /  d   /  d   /  d         \\\
(1 - n) |----- |----- |----- f(eta)|||
        \ deta \ deta \ deta       ///

            /  d   /  d         \\     /  d         \
   + f(eta) |----- |----- f(eta)|| - M |----- f(eta)|
            \ deta \ deta       //     \ deta       /

            /  d   /  d   /  d         \\\ /  d   /  d         \\   
   + n W[e] |----- |----- |----- f(eta)||| |----- |----- f(eta)|| = 
            \ deta \ deta \ deta       /// \ deta \ deta       //   

  0
deq1; eval(eq1, fixedparameter1);
    /  d   /  d   /  d         \\\
0.7 |----- |----- |----- f(eta)|||
    \ deta \ deta \ deta       ///

            /  d   /  d         \\       /  d         \
   + f(eta) |----- |----- f(eta)|| - 0.2 |----- f(eta)|
            \ deta \ deta       //       \ deta       /

          /  d   /  d   /  d         \\\ /  d   /  d         \\   
   + 0.09 |----- |----- |----- f(eta)||| |----- |----- f(eta)|| = 
          \ deta \ deta \ deta       /// \ deta \ deta       //   

  0
eq2 := (1+(4/3)*N[r])*(diff(theta(eta), eta, eta))+Pr*f(eta)*(diff(theta(eta), eta))+Nb*(diff(phi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))*(diff(theta(eta), eta)) = 0;
          /    4     \ /  d   /  d             \\
          |1 + - N[r]| |----- |----- theta(eta)||
          \    3     / \ deta \ deta           //

                         /  d             \
             + Pr f(eta) |----- theta(eta)|
                         \ deta           /

                  /  d           \ /  d             \
             + Nb |----- phi(eta)| |----- theta(eta)|
                  \ deta         / \ deta           /

                                    2    
                  /  d             \     
             + Nt |----- theta(eta)|  = 0
                  \ deta           /     
deq2; eval(eq2, fixedparameter1);
                      /  d   /  d             \\
          2.066666667 |----- |----- theta(eta)||
                      \ deta \ deta           //

                           /  d             \
             + 0.72 f(eta) |----- theta(eta)|
                           \ deta           /

                   /  d           \ /  d             \
             + 0.5 |----- phi(eta)| |----- theta(eta)|
                   \ deta         / \ deta           /

                                     2    
                   /  d             \     
             + 0.5 |----- theta(eta)|  = 0
                   \ deta           /     
eq3 := diff(phi(eta), eta, eta)+Pr*Le*f(eta)*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb = 0;
    /  d   /  d           \\                /  d           \
    |----- |----- phi(eta)|| + Pr Le f(eta) |----- phi(eta)|
    \ deta \ deta         //                \ deta         /

            /  d   /  d             \\    
         Nt |----- |----- theta(eta)||    
            \ deta \ deta           //    
       + ----------------------------- = 0
                      Nb                  
deq3 := eval(eq3, fixedparameter1);
    /  d   /  d           \\               /  d           \
    |----- |----- phi(eta)|| + 3.60 f(eta) |----- phi(eta)|
    \ deta \ deta         //               \ deta         /

                     /  d   /  d             \\    
       + 1.000000000 |----- |----- theta(eta)|| = 0
                     \ deta \ deta           //    
bcs1 := f(0) = 0, D(f)(0) = 1+gamma*(D@D)(F)(0)+delta*(D@D@D)(f)(0), D(f)(8) = 0;
 f(0) = 0, 

   D(f)(0) = 1 + gamma @@(D, 2)(F)(0) + delta @@(D, 3)(f)(0), 

   D(f)(8) = 0
bc1 := eval(bcs1, fixedparameter1);
   f(0) = 0, D(f)(0) = 1 + @@(D, 2)(F)(0) - @@(D, 3)(f)(0), 

     D(f)(8) = 0
bcs2 := D(theta)(0) = Bi*(theta(0)-1), theta(8) = 0;
         D(theta)(0) = Bi (theta(0) - 1), theta(8) = 0
bc2 := eval(bcs2, fixedparameter1);
           D(theta)(0) = 2 theta(0) - 2, theta(8) = 0
bcs3 := Nb*D(phi)(0)+Nt*D(theta)(0) = 0, Nb*D(phi)(0)+Nt*D(theta)(0) = 0, phi(8) = 0;
        Nb D(phi)(0) + Nt D(theta)(0) = 0, 

          Nb D(phi)(0) + Nt D(theta)(0) = 0, phi(8) = 0
bc3 := eval(bcs3, fixedparameter1);
       0.5 D(phi)(0) + 0.5 D(theta)(0) = 0, 

         0.5 D(phi)(0) + 0.5 D(theta)(0) = 0, phi(8) = 0
R := dsolve({bc1, bc2, bc3, deq1, deq2, deq3}, [f(eta), theta(eta), phi(eta)], numeric, output = listprocedure);
Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations


 

Dear Maple Primes,

could you, please, help me with numeric integration? I’m new in numeric integration and can’t reach desired precision of a result.
Here is the integral f(xmax) that I try to compute for different values of xmax from the interval 0.025..0.24 :

f:=(xmax)->Int(K*F*Int(G*F,x=x..xmax,method=integrationmethod),x=x0..xmax,method=integrationmethod)

where x0 is lower limit of outer integral, x0 := 0.025

and K, F and G are functions of x

K:=x-x0

F:=(a1+a2*x+a3*x2+a4*x5)/(b1*x+b2*x2+b3*x6)

G:=exp(c1+c2*x+c3*x7)

with

a1:=8e3; a2:=6e4; a3:=3e4; a4:=1.8e8;
b1:=9.2e17; b2:=1.1e18; b3:=4.6e21;
c1:=8.202046; c2:=-12.31377; c3:=-818043.42;

Please, notice, that G (as well as G*F) is a steeply decreasing function on the interval x = 0.025..0.24.

I get "a seemingly correct" result (that means that f increases as xmax intreases), when I try to plot f(xmax) for the following "guessed" options

Digits:=15
integrationmethod:=_d01akc
plot(f,0.21..0.24,color=black)

What is puzzling me is that I get a different "seemingly correct" result, when I modify the integral f by,
at fist, multiplying G by a constant (for example Const:=1e20; G:=Const*exp(c1+c2*x+c3*x7) )
and, second, plotting the f divided by this constant:

plot(f/Const,0.21..0.24,color=red)

The following Figure presents the values of f plotted versus xmax with (red curve) and without (black curve) using of the constant Const:

Dear Primes, could you, please, comment on this difference? Because the only indicator that I have (from the analysis of G, F and K) is that f must be a monotonically (and stricktly) increasing function of xmax.

Please, find the maple worksheet in attachment.

Thank you in advance!
Maks

for_primes_numeric_integration_v02.mw

this is a terrible maple crash just for a simple option !!!

only when i want to print the "x^2+y^2" in the caption of plot it raise exception !
but for some formulae there is no problem !
some technical guide or advise is needed ?
may someone check maple 2018 for this issue too ?

shekofte003.mw

    Hello, colleagues!

    I want to find zero function given by the process that integrates the ODE, but get this warning and do not know what to do with it.  I will be grateful to any advice!!!

T0 := 300; G1 := 1.2*10^6; G2 := 1.2*10^6; k := 1.79333595*10^(-6); l := 1/(12*10^4); U_max := 5.0; th0 := .5; q0 := 0.1e-2:

u(x):=piecewise(x<=-1,-U_max,x>1,U_max,x<=1 and x>-1,0): 

sys := diff(x1(t), t) = x2(t),
           diff(x2(t), t) = l*u(x4(t))-k*sin(2*x1(t)),

           diff(x4(t), t) = -x3(t),

            diff(x3(t), t) = 2*k*cos(2*x1(t))*x4(t);


init:=x1(0)=th0,   x2(0)=q0: 

h1 := proc (t1, alpha_1, alpha_2, th_0, q_0, g1)::float;
local X1, X3, Res;
ptions operator, arrow;
global sys, u;
X1 := eval(x1(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
X3 := eval(x3(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
es := X3(t1)+2*g1*X1(t1);
return Res end proc

h2 := proc (t1, alpha_1, alpha_2, th_0, q_0, g2)::float;
local X2, X4, Res;
options operator, arrow;
global sys, u;
X2 := eval(x2(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
X4 := eval(x4(t), dsolve({sys, x1(0) = th_0, x2(0) = q_0, x3(0) = alpha_1, x4(0) = alpha_2}, numeric, range = 0 .. t1, output = listprocedure));
Res := X4(t1)+2*g2*X2(t1);
return Res
end proc

Test_h1 := proc (x, y)::float;
h1(10.0, x, y, 0.209327944398961e-2, -0.417641536045032e-3, G2)
end proc;

Test_h2 := proc (x, y)::float;
h2(10.0, x, y, 0.209327944398961e-2, -0.417641536045032e-3, G2)
end proc

fsolve([Test_h1, Test_h2]);
Warning, unable to store _EnvDSNumericSaveDigits when datatype=integer[8]
Test_2.mw

I am trying to show visually how many Lie derivatives of two different objects are needed to get a unique solution to a problem, so i want to create a graph of the form:


for the elements of this workseet:
3d_plot_of_Lie_derivatives_against_numelems.mw

I using Maple 18 (not Maple 2018) and I'm trying to figure out how to grab earthquake data from earthquakescanada database from here http://www.earthquakescanada.nrcan.gc.ca//stndon/NEDB-BNDS/bull-en.php using the HTTP requests.

First I used the default search within the web browser, and get a new address which I enter as the URL

HTTP:-Get("http://www.earthquakescanada.nrcan.gc.ca//stndon/NEDB-BNDS/bull-en.php?time_start=2018%2F04%2F23+22%3A47%3A00&time_end=2018%2F05%2F23+22%3A47%3A00&depth_min=0&depth_max=100&mag_min=-3&mag_max=9.9&shape_type=region&radius_center_lat=50&radius_center_lon=-95&radius_radius=1000&region_north=90&region_south=41&region_east=-40&region_west=-150&eq_type_L=1&display_list=1&list_sort=date&list_order=a&tpl_output=html&submited=1"

It takes a long time to download the information and would require HTML surgery but changing the option for output to txt or csv, it's faster and in a much more readable form.  However it's not in a table or Array format, it has become a string.

Is there any way to use ImportMatrix, or ImportData to get a better format of the information?  - both give errors in Maple18.  Or am I stuck trying to use string surgery in Maple 18?  The Import command isn't available until Maple 2016 (I don't mean the Import command within ExcelTools) and I believe that works in Maple 2018 however I'm at a loss for trying to use it in Maple 18. 

Just like the title described, I have encountered an error when I use the command "expand". Actually, I just follow the example, but it doesn't work. Please help me or tell me how can I solve it in other commands.


restart;
alias(epsilon = e, omega = w, omega[0] = w0, t[1] = t1, t[2] = t2); e := proc (t1, t2) options operator, arrow; e end proc; w0 := proc (t1, t2) options operator, arrow; w0 end proc; a := proc (t1, t2) options operator, arrow; a end proc; f := proc (t1, t2) options operator, arrow; f end proc; mu := proc (t1, t2) options operator, arrow; mu end proc;
ode := (D@@2)(u)+2*mu*e*D(u)+w0^2*u+e*w0^2*u^3-e*f*cos(omega*t) = 0;
                                               2  
     @@(D, 2)(u) + 2 mu epsilon D(u) + omega[0]  u

                          2  3                             
        + epsilon omega[0]  u  - epsilon f cos(omega t) = 0
e_oredr := 1;
ode := simplify(subs(D = sum('e^(i-1)*D[i]', 'i' = 1 .. e_oredr+1), ode), {e^(e_oredr+1) = 0});
 / 3         2                                                 
 \u  omega[0]  + 2 (epsilon D[2] + D[1])(u) mu - cos(omega t) f

                  \                   2                   
    + 2 D[1, 2](u)/ epsilon + omega[0]  u + D[1, 1](u) = 0
simplify(collect(%, e), {e^(e_oredr+1) = 0});

u := sum('v[i]*e^i', 'i' = 0 .. e_oredr);
                      epsilon v[1] + v[0]
ode := simplify(collect(ode, e), {e^2 = 0});
for i from 0 to e_oredr do eq[i] := coeff(lhs(ode), e, i) = 0 end do;
                       2                         
               omega[0]  v[0] + D[1, 1](v[0]) = 0
       3         2           2                       
   v[0]  omega[0]  + omega[0]  v[1] + 2 D[1](v[0]) mu

      - cos(omega t) f + 2 D[1, 2](v[0]) + D[1, 1](v[1]) = 0
remove(has, lhs(eq[1]), cos); convert(%(t1, t2), diff);
eq[1] := %-convert(f*cos(sigma*t2+t1*w0), 'exp');

v[0] := A(t2)*cos(w0*t1+B(t2)); convert(%, 'exp'); v[0] := unapply(%, t1, t2);
                         /1                             
       (t1, t2) -> A(t2) |- exp(I (omega[0] t1 + B(t2)))
                         \2                             

            1                              \
          + - exp(-I (omega[0] t1 + B(t2)))|
            2                              /

expand(eq[1]);
Error, (in property/ConvertProperty) invalid input: PropRange uses a 2nd argument, b, which is missing
collect(%, exp(I*w0*t1));
Error, (in collect) invalid 1st argument proc (t1, t2) options operator, arrow; A(t2)*((1/2)*exp(I*(w0*t1+B(t2)))+(1/2)*exp(-I*(w0*t1+B(t2)))) end proc
coeff(%, exp(I*w0*t1));
map(proc (x) options operator, arrow; x*exp(-I*B(t2)) end proc, %);
combine(%, 'exp');
subs(I*B(t2) = I*sigma*t2-I*C(t2), B(t2) = sigma*t2-C(t2), %);
conds := combine(%, 'exp');
                               0

 

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