Maple 17 Questions and Posts

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

In using maple 17, for a for loop, the alias command is valid outside the for loop, but entering the for loop, maple verifies that alias is not recognized.The code is as follows:
with(PDEtools):
for k from 1 to 4 do
alias(u[k]=u[k](x,y,t));
alias(a[k]=a[k](x,y,t));
od:
print(has(a[1],x));
sol:=[]:
for i from 1 to 4 do
sol:=[sol[],a[i]=rhs(isolate(a[i]+diff(a[i],x)+i=0,diff(a[i],x)))];
print(has(a[i],x));
end do;
The output is as follows: thequestionofalias
true
[a[1] = a[1] + 1]
false
[a[1] = a[1] + 1, a[2] = a[2] + 2]
false
[a[1] = a[1] + 1, a[2] = a[2] + 2, a[3] = a[3] + 3]
false
[a[1] = a[1] + 1, a[2] = a[2] + 2, a[3] = a[3] + 3, a[4] = a[4] + 4]
false
Why is it outside the loop? A [1] ... A [4] has the variable x, but either a [ I ] or a [1] has no variable X.Send the question to the Forum and see which expert can answer it. See how you can make the alias command work inside a for loop! I'd appreciate it if you could answer that!

How to solve this integral equation?

rho:=1/(2);

mu:=1/(2);

T:=1/(4)*(t-x)^(1/(2));

E[rho,mu](T):=Sum((T^(k))/(GAMMA(k*rho+ mu)),k=0..5);
                       
eq1 := h(t) = (8/3)*(int((t-x)^(1/2)*E[rho, mu](T)*(1/(sqrt(Pi)*x^(1/2))-(3/32)*x^2+(3/16)*exp(-x)-1), t = -1 .. 1));       

 

Download 1.mw

   

Hi!

There is some procedure/function to convert C code into maple code? For instance, the above text file

C_code.txt

contains the C code of this paper  http://www.dcs.bbk.ac.uk/~jkl/pubs/JL1_00a.pdf to compute the image of a point in [0,1] under the N-dimensional Hilbert curve and vice versa (i.e., given a point P in the N-dimensional cube [0,1]^{N} find the point t in [0,1] such that t is mapped into P under the Hilbert curve)

Unfortunately, I don't know anything about the C programming language.

Many thanks in advance for your comments.

When i trying to solve the BVP the following error will found 

Error, (in fproc) unable to store 'HFloat(1.0141653815612295)+HFloat(0.0020355870386861838)*I' when datatype=float[8]
 

I have attached my worksheet.

Please anyone help me to get solution to this problem.

Thank you so much

Download Main.mw

 

I'm trying to solve the problem which is published in the research article. The paper is attached. 

This work done with the help of shooting technique in maple 18

1.Is it possible to solve in maple 17

2. How to obtain the triple soln

3. How to implement Shooting technique

Please anyone help me to get this 

 

restart:

with(plots):

eq1 := (1+K)*(diff(f(eta), `$`(eta, 3)))+f(eta)*(diff(f(eta), `$`(eta, 2)))+K*(diff(g(eta), eta))-2*(diff(f(eta), eta))^2-M*(diff(f(eta), eta)) = 0;

(1+K)*(diff(diff(diff(f(eta), eta), eta), eta))+f(eta)*(diff(diff(f(eta), eta), eta))+K*(diff(g(eta), eta))-2*(diff(f(eta), eta))^2-M*(diff(f(eta), eta)) = 0

(1)

eq2 := (1+(1/2)*K)*(diff(g(eta), `$`(eta, 2)))+f(eta)*(diff(g(eta), eta))-3*g(eta)*(diff(f(eta), eta))-2*K*g(eta)-K*(diff(f(eta), `$`(eta, 2))) = 0;

(1+(1/2)*K)*(diff(diff(g(eta), eta), eta))+f(eta)*(diff(g(eta), eta))-3*g(eta)*(diff(f(eta), eta))-2*K*g(eta)-K*(diff(diff(f(eta), eta), eta)) = 0

(2)

eq3 := (1+(4/3)*Rd)*(diff(theta(eta), `$`(eta, 2)))/Pr+f(eta)*(diff(theta(eta), eta))+Nb*(diff(chi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))^2 = 0;

(1+(4/3)*Rd)*(diff(diff(theta(eta), eta), eta))/Pr+f(eta)*(diff(theta(eta), eta))+Nb*(diff(chi(eta), eta))*(diff(theta(eta), eta))+Nt*(diff(theta(eta), eta))^2 = 0

(3)

eq4 := diff(chi(eta), `$`(eta, 2))+Sc*f(eta)*(diff(chi(eta), eta))+Nt*(diff(theta(eta), `$`(eta, 2)))/Nb = 0;

diff(diff(chi(eta), eta), eta)+Sc*f(eta)*(diff(chi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb = 0

(4)

bcs := f(0) = S, (D(f))(0) = -1, g(0) = -m*((D^2)(f))(0), (D(theta))(0) = -A*(1-theta(0)), chi(0) = 1+delta*(D(chi))(0), (D(f))(10) = 0, g(10) = 0, theta(10) = 0, chi(10) = 0;

f(0) = S, (D(f))(0) = -1, g(0) = -m*(D(f))(0)^2, (D(theta))(0) = -A*(1-theta(0)), chi(0) = 1+delta*(D(chi))(0), (D(f))(10) = 0, g(10) = 0, theta(10) = 0, chi(10) = 0

(5)

params := [K = .1, S = 2.1257, m = .5, Pr = 2, Nb = .3, Nt = .5, Sc = 2, Rd = .5, delta = .1, A = 5];

[K = .1, S = 2.1257, m = .5, Pr = 2, Nb = .3, Nt = .5, Sc = 2, Rd = .5, delta = .1, A = 5]

(6)

sol := dsolve(eval([eq1, eq2, eq3, eq4, bcs], params), numeric, output = listprocedure, maxmesh = 5000)

Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 10, got 9

 

``


 

Download Triple.mw

Hi

 

I want to write this system and solve it by picard iteration method

but I don't know how to write a system of ODE in maple

 

x'=cos (x)    x(0)=1

y'= sin (z)    y(0)=-1

z'= zy           z(0)=2

 

In the below paper 

ODEs are solved by using Matlab Software

Is it possible to solve this in Matlab software?  [I think you mean Maple!--Carl Love]

I have attached the Article

 

j.physa.2019.123959.pdf

Hi 
I need to represent the contourplot of sum a function as

contourplot(sum(BesselJ(n,r),n=0..5),r=-10..10).
can anyone know what the problem is ?

Thanks


I m Stucked with this step

restart; with(plots)

eq1 := 2*n*4^n*eta^((n+1)*(1/2))*(diff(f(eta), `$`(eta, 2)))^(n-1)*(diff(f(eta), `$`(eta, 3)))+4^n*(n+1)*eta^((n-1)*(1/2))*(diff(f(eta), `$`(eta, 2)))^n+4*f(eta)*(diff(f(eta), `$`(eta, 2)))-4*m*(diff(f(eta), eta))^2+m-2*M*(diff(f(eta), eta)) = 0;

2*n*4^n*eta^((1/2)*n+1/2)*(diff(diff(f(eta), eta), eta))^(n-1)*(diff(diff(diff(f(eta), eta), eta), eta))+4^n*(n+1)*eta^((1/2)*n-1/2)*(diff(diff(f(eta), eta), eta))^n+4*f(eta)*(diff(diff(f(eta), eta), eta))-4*m*(diff(f(eta), eta))^2+m-2*M*(diff(f(eta), eta)) = 0

(1)

eq2 := 2*eta*(diff(theta(eta), `$`(eta, 2)))+2*(diff(theta(eta), eta))+Pr*(f(eta)*(diff(theta(eta), eta))-s*(diff(f(eta), eta))*theta(eta))+Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Nt*(diff(theta(eta), `$`(eta, 2)))^2 = 0;

2*eta*(diff(diff(theta(eta), eta), eta))+2*(diff(theta(eta), eta))+Pr*(f(eta)*(diff(theta(eta), eta))-s*(diff(f(eta), eta))*theta(eta))+Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))^2 = 0

(2)

eq3 := 2*eta*(diff(phi(eta), `$`(eta, 2)))+2*(diff(phi(eta), eta))+Sc*(f(eta)*(diff(phi(eta), eta))-s*(diff(f(eta), eta))*phi(eta))+Nb*(2*eta*(diff(theta(eta), `$`(eta, 2)))+2*(diff(theta(eta), eta)))/Nt = 0;
``

2*eta*(diff(diff(phi(eta), eta), eta))+2*(diff(phi(eta), eta))+Sc*(f(eta)*(diff(phi(eta), eta))-s*(diff(f(eta), eta))*phi(eta))+Nb*(2*eta*(diff(diff(theta(eta), eta), eta))+2*(diff(theta(eta), eta)))/Nt = 0

(3)

eq4 := 2*eta*(diff(chi(eta), `$`(eta, 2)))+2*(diff(chi(eta), eta))+Lb*(f(eta)*(diff(chi(eta), eta))-s*(diff(f(eta), eta))*chi(eta))-Pe*(2*eta*chi(eta)*(diff(phi(eta), `$`(eta, 2)))+2*chi(eta)*(diff(phi(eta), eta))+2*eta*(diff(chi(eta), `$`(eta, 2)))*(diff(phi(eta), `$`(eta, 2)))) = 0;

2*eta*(diff(diff(chi(eta), eta), eta))+2*(diff(chi(eta), eta))+Lb*(f(eta)*(diff(chi(eta), eta))-s*(diff(f(eta), eta))*chi(eta))-Pe*(2*eta*chi(eta)*(diff(diff(phi(eta), eta), eta))+2*chi(eta)*(diff(phi(eta), eta))+2*eta*(diff(diff(chi(eta), eta), eta))*(diff(diff(phi(eta), eta), eta))) = 0

(4)

bcs := (D(f))(a) = 0, f(a) = 2*s*a*(D(phi))(a)/Sc, theta(a) = 1, phi(a) = 1, chi(a) = 1, (D(f))(10) = 1/2, theta(10) = 0, phi(10) = 0, chi(10) = 0;

(D(f))(a) = 0, f(a) = 2*s*a*(D(phi))(a)/Sc, theta(a) = 1, phi(a) = 1, chi(a) = 1, (D(f))(10) = 1/2, theta(10) = 0, phi(10) = 0, chi(10) = 0

(5)

params := {Lb = .1, M = .1, Nb = .6, Nt = .2, Pe = 5, Pr = 6.2, Sc = .1, a = 0.1e-1, m = 1/3, n = 1, s = .1};

{Lb = .1, M = .1, Nb = .6, Nt = .2, Pe = 5, Pr = 6.2, Sc = .1, a = 0.1e-1, m = 1/3, n = 1, s = .1}

(6)

sol := dsolve(eval([eq1, eq2, eq3, eq4, bcs], params), numeric, output = listprocedure, maxmesh = 1024)

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 

odeplot(sol, [[eta, f(eta)][eta, phi(eta)], [eta, theta(eta)], [eta, chi(eta)]], eta = eval(c, params) .. 10)

Error, invalid subscript selector

 

NULL


 

Download Pblm2.mw

When I try to solve this problem above error displays

Here is the file
 

Download Main.mw


When i try to solve the problem i got error like this 

Please help me get the solution

restart

with(plots):

eq1 := (2*(eta*(diff(f(eta), `$`(eta, 3)))+diff(f(eta), `$`(eta, 2))))/((1-phi[1])^2.5*(1-phi[2])^2.5)+((1-phi[2])*(1-phi[1]+phi[1]*rho[s1]/rho[f])+phi[2]*rho[s2]/rho[f])*f(eta)*(diff(f(eta), `$`(eta, 2)))-sigma[hnf]*M*(diff(f(eta), eta))/(sigma[f]*(m^2+1)) = 0;

2*(eta*(diff(diff(diff(f(eta), eta), eta), eta))+diff(diff(f(eta), eta), eta))/((1-phi[1])^2.5*(1-phi[2])^2.5)+((1-phi[2])*(1-phi[1]+phi[1]*rho[s1]/rho[f])+phi[2]*rho[s2]/rho[f])*f(eta)*(diff(diff(f(eta), eta), eta))-sigma[hnf]*M*(diff(f(eta), eta))/(sigma[f]*(m^2+1)) = 0

(1)

eq2 := k[hnf]*(eta*(diff(theta(eta), `$`(eta, 2)))+diff(theta(eta), eta))/k[f]+(1/2)*Pr*((1-phi[2])*(1-phi[1]+phi[1]*`ρC`[p][s1]/`ρC`[p][f])+phi[2]*`ρC`[p][s2]/`ρC`[p][f])*f(eta)*(diff(theta(eta), eta)) = 0;

k[hnf]*(eta*(diff(diff(theta(eta), eta), eta))+diff(theta(eta), eta))/k[f]+(1/2)*Pr*((1-phi[2])*(1-phi[1]+phi[1]*`ρC`[p][s1]/`ρC`[p][f])+phi[2]*`ρC`[p][s2]/`ρC`[p][f])*f(eta)*(diff(theta(eta), eta)) = 0

(2)

eq3 := 2*(1-phi[1])^2.5*(1-phi[2])^2.5*(eta*(diff(chi(eta), `$`(eta, 2)))+diff(chi(eta), eta))+Sc*f(eta)*(diff(chi(eta), eta))-beta*Sc*(1+delta*theta(eta))^n*exp^(-E/(1+delta*theta(eta)))*chi(eta) = 0;

2*(1-phi[1])^2.5*(1-phi[2])^2.5*(eta*(diff(diff(chi(eta), eta), eta))+diff(chi(eta), eta))+Sc*f(eta)*(diff(chi(eta), eta))-beta*Sc*(1+delta*theta(eta))^n*exp^(-E/(1+delta*theta(eta)))*chi(eta) = 0

(3)

bcs := f(c) = (1/2)*lambda*c, (D(f))(c) = (1/2)*lambda, theta(c) = 1, chi(c) = 1, (D(f))(10) = (1-lambda)*(1/2), theta(10) = 0, chi(10) = 0;

f(c) = (1/2)*lambda*c, (D(f))(c) = (1/2)*lambda, theta(c) = 1, chi(c) = 1, (D(f))(10) = 1/2-(1/2)*lambda, theta(10) = 0, chi(10) = 0

(4)

params := {E = .5, M = .1, Pr = 6.2, Sc = .5, beta = .5, c = .1, delta = .5, lambda = -1, m = .5, n = .1, k[f] = .6130, k[hnf] = 1.039626683, phi[1] = .1, phi[2] = .1, rho[f] = 997.1, rho[s1] = 5180, rho[s2] = 1800, sigma[f] = 0.5e-1, sigma[hnf] = 0.8888888337e-1, `ρC`[p][f] = 4.1668809*10^6, `ρC`[p][s1] = 3470600, `ρC`[p][s2] = 1290600};

{E = .5, M = .1, Pr = 6.2, Sc = .5, beta = .5, c = .1, delta = .5, lambda = -1, m = .5, n = .1, k[f] = .6130, k[hnf] = 1.039626683, phi[1] = .1, phi[2] = .1, rho[f] = 997.1, rho[s1] = 5180, rho[s2] = 1800, sigma[f] = 0.5e-1, sigma[hnf] = 0.8888888337e-1, `ρC`[p][f] = 4166880.900, `ρC`[p][s1] = 3470600, `ρC`[p][s2] = 1290600}

(5)

ODEs := [eq1, eq2, eq3]

[2*(eta*(diff(diff(diff(f(eta), eta), eta), eta))+diff(diff(f(eta), eta), eta))/((1-phi[1])^2.5*(1-phi[2])^2.5)+((1-phi[2])*(1-phi[1]+phi[1]*rho[s1]/rho[f])+phi[2]*rho[s2]/rho[f])*f(eta)*(diff(diff(f(eta), eta), eta))-sigma[hnf]*M*(diff(f(eta), eta))/(sigma[f]*(m^2+1)) = 0, k[hnf]*(eta*(diff(diff(theta(eta), eta), eta))+diff(theta(eta), eta))/k[f]+(1/2)*Pr*((1-phi[2])*(1-phi[1]+phi[1]*`ρC`[p][s1]/`ρC`[p][f])+phi[2]*`ρC`[p][s2]/`ρC`[p][f])*f(eta)*(diff(theta(eta), eta)) = 0, 2*(1-phi[1])^2.5*(1-phi[2])^2.5*(eta*(diff(diff(chi(eta), eta), eta))+diff(chi(eta), eta))+Sc*f(eta)*(diff(chi(eta), eta))-beta*Sc*(1+delta*theta(eta))^n*exp^(-E/(1+delta*theta(eta)))*chi(eta) = 0]

(6)

``

sol := dsolve(eval([ODES, bcs], params), numeric, output = listprocedure)

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

 

``


 

Download 1.mw
 

 

 

Hi

cant get the answer, any comments plz

f := (x, y) ->(1/2)*a*(sinh(y-x^2)+tanh(x-y^3));

evalf(int(int(f(x, y), x = -6 .. 5), y = -5 .. 5)):


One forum had a topic related to such a platform. You can download a video of the movement of this platform from the picture at this link. The manufacturer calls the three-degrees platform, that is, having three degrees of freedom. Three cranks rotate, and the platform is connected to them by connecting rods through ball joints. The movable beam (rocker arm) has torsion springs.  I counted 4 degrees of freedom, because when all three cranks are locked, the platform remains mobile, which is camouflaged by the springs of the rocker arm. Actually, the topic on the forum arose due to problems with the work of this platform. Neither the designers nor those who operate the platform take into account this additional fourth, so-called parasitic degree of freedom. Obviously, if we will to move the rocker with the locked  cranks , the platform will move.
Based on this parasitic movement and a similar platform design, a very simple device is proposed that has one degree of freedom and is, in fact, a spatial linkage mechanism. We remove 3 cranks, keep the connecting rods, convert the rocker arm into a crank and get such movements that will not be worse (will not yield) to the movements of the platform with 6 degrees of freedom. And by changing the length of the crank, the plane of its rotation, etc., we can create simple structures with the required design trajectories of movement and one degree of freedom.
Two examples (two pictures for each example). The crank rotates in the vertical plane (side view and top view)
PLAT_1.mw


and the crank rotates in the horizontal plane (side view and top view).

The program consists of three parts. 1 choice of starting position, 2 calculation of the trajectory, 3 design of the picture.  Similar to the programm  in this topic.

 

 

Controlled platform with 6 degrees of freedom. It has three rotary-inclined racks of variable length:

and an example of movement parallel to the base:

Perhaps the Stewart platform may not reproduce such trajectories, but that is not the point. There is a way to select a design for those specific functions that our platform will perform. That is, first we consider the required trajectories of the platform movement, and only then we select a driving device that can reproduce them. For example, we can fix the extreme positions of the actuators during the movement of the platform and compare them with the capabilities of existing designs, or simulate your own devices.
In this case, the program consists of three parts. (The text of the program directly for the first figure : PLATFORM_6.mw) In the first part, we select the starting point for the movement of a rigid body with six degrees of freedom. Here three equations f6, f7, f8 are responsible for the six degrees of freedom. The equations f1, f2, f3, f4, f5 define a trajectory of motion of a rigid body. The coordinates of the starting point are transmitted via disk E for the second part of the program. In the second part of the program, the trajectory of a rigid body is calculated using the Draghilev method. Then the trajectory data is transferred via the disk E for the third part of the program.
In the third part of the program, the visualization is executed and the platform motion drive device is modeled.
It is like a sketch of a possible way to create controlled platforms with six degrees of freedom. Any device that can provide the desired trajectory can be inserted into the third part. At the same time, it is obvious that the geometric parameters of the movement of this device with the control of possible emergency positions and the solution of the inverse kinematics problem can be obtained automatically if we add the appropriate code to the program text.
Equations can be of any kind and can be combined with each other, and they must be continuously differentiable. But first, the equations must be reduced to uniform variables in order to apply the Draghilev method.
(These examples use implicit equations for the coordinates of the vertices of the triangle.)

Hi friends,

I have the next list of strings and I want to convert it to a list of vectors.

 

with(StringTools)

Generate(3, "012");
["000", "001", "002", "010", "011", "012", "020", "021", "022",

  "100", "101", "102", "110", "111", "112", "120", "121", "122",

  "200", "201", "202", "210", "211", "212", "220", "221", "222"]

 

Or maybe there's an easiest way to generate all the n-ary vectors of a given lenght.

Thank's in advance.

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