Maple 2021 Questions and Posts

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

restart;
with(plots):
with(geometry):
_EnvHorizontalName := x:
_EnvVerticalName := y:
R := 11:
r := 7:
a := sqrt(R*r):

b := 2:
circle(C1, [point(P1, [0, 0]), R]):
circle(C2, [point(P2, [R + 2*b + r, 0]), r]):
ellipse(p, (x - R - b)^2/b^2 + y^2/a^2 = 1):
draw([C1(color = yellow, filled = true), 
C2(color = red, filled = true), p(color = blue, filled = true), 
C1(color = black), C2(color = black), p(color = black)], 
axes = none, view = [-15 .. 35, -15 .. 15], scaling = constrained):
alpha := arctan((R - r)/(R + 2*b + r));
long := cos(alpha)*(R + 2*b + r);
evalf(%);
circle(C2, [point(P2, [long, r - R]), r]);
rotation(p1, p, alpha, 'clockwise');
detail(p1);
point(A, 0, -R);
point(B, long, -R);
line(L1, [A, B]);
point(cen, [(143*sqrt(5))/25, -(26*sqrt(5))/25]);
reflection(L2, L1, cen);
detail(L2);
Error, (in geometry:-reflection) unable to compute coeff
Error, (in geometry:-detail) unknown object:  L2

draw([C1(color = yellow, filled = true), C2(color = red, filled = true), p1(color = blue, filled = true), C1(color = black), C2(color = black), p1(color = black), L1(color = black)], axes = none, view = [-15 .. 35, -15 .. 15], scaling = constrained);
A Bug in reflection ? Why these error messages. Thank you.

I wonder if there is any way to use ArrayInterpolation with contourplot or similar effect?

N_data.xlsx 

Thank you in advance,

restart;

with(CurveFitting)

[ArrayInterpolation, BSpline, BSplineCurve, Interactive, LeastSquares, Lowess, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

(1)

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, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(2)

alpha := <seq(0..10,evalf(10/50))>:
beta := <seq(0..10,evalf(10/50))>:

excelfile:= FileTools:-JoinPath(["C:","Users","aimer","OneDrive","Desktop","Msc Thesis","Maple ref","N_data.xlsx"]);

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx"

(3)

NN:=ImportMatrix(excelfile,source=Excel):

_rtable[36893489576445216036]

(4)

#?ImportMatrix;

#NN:=ImportMatrix(matlabData, source=MATLAB);

#currentdir();

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref"

(5)

 

contourplot(ArrayInterpolation([beta,alpha],NN,[x,y]),x=0..10,y=0..10,contours=[0]);

Error, (in CurveFitting:-ArrayInterpolation) invalid input: xvalues are not specified correctly

 

#?listcontplot

 

Download test1.mw

I do not know what is the problem with Using ImportMatrix. N_data.xlsx is in the same directory.

Any comment would be appreciated.

restart;

with(CurveFitting)

[ArrayInterpolation, BSpline, BSplineCurve, Interactive, LeastSquares, Lowess, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

(1)

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, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(2)

alpha := <seq(0..10,evalf(10/50))>:
beta := <seq(0..10,evalf(10/50))>:

excelfile:= FileTools:-JoinPath(["C: ","Users","aimer","OneDrive","Desktop","Msc Thesis","Maple ref","N_data.xlsx"]);

"C: \Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx"

(3)

NN:=ImportMatrix(excelfile,source=Excel);

Error, (in ImportMatrix) file or directory does not exist: C: \Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx

 

?ImportMatrix;

#NN:=ImportMatrix(matlabData, source=MATLAB);

currentdir();

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref"

(4)

?Joinpath

 

Download test1.mw

polysols(diff(u(x), x) = u(x)^2 - 1) produces no results, while it can be verified by direct observation that u(x) = 1 is a polynomial solution.

I can not spawn draw the circles C3 and C4

restart;
with(plots):
with(geometry):
_EnvHorizontalName := x:
_EnvVerticalName := y:
R := 7:
point(A, [0, R]):
line(L1, y = sqrt(3)*x + R):
line(L2, y = -sqrt(3)*x + R):
line(L3, y = R/3):
intersection(B, L1, L3):
intersection(C, L2, L3):
detail(C):
triangle(ABC, [A, B, C]):
circle(C1, [point(P1, [0, 0]), R]):
circle(C2, [point(P2, [0, R/3 + (2*R)/9]), (2*R)/9]):
detail(C2):
center(C2), coordinates(center(C2)):
reflection(P3, P2, C):
detail(P3):
reflection(C3, C2, C);
detail(C3):
Error, (in geometry:-reflection) unable to compute coeff
Error, (in geometry:-detail) unknown object:  C3
circle(C3, [point(P3*[(28*sqrt(3))/9, 7/9]), (2*R)/9]):
Error, (in geometry:-point) wrong number of arguments
reflection(C4, C2, B);
detail(C4);
Error, (in geometry:-reflection) unable to compute coeff
Error, (in geometry:-detail) unknown object:  C4
circle(C3*[point(P3, [(28*sqrt(3))/9, 7/9]), (2*R)/9]);
Error, (in geometry:-circle) wrong number of arguments


draw([L1(color = blue), 
ABC(color = red, transparency = 0.5, filled = true), 
L2(color = blue), L3(color = blue), 
C1(color = blue, thickness = 3), C1(color = yellow, transparency = 0.8, filled = true), C2(color = blue, filled = true)], 
axes = normal,
 view = [-R .. R, -R .. R], 
scaling = constrained);
Why these error messages. Thank you veru much.

fig([L1(color = blue), L2(color = blue), L3(color = green), C1(color = black), C2(color = black), C3(color = orange), C4(color = orange)]);
point(oo, [0, 0]);
                               oo

rotation(fig1, fig, oo, Pi/2, 'counterclockwise');
Error, (in geometry:-rotation) wrong type of arguments why thos error ? Thank you;
 

What should I do to reduce evaluating time?

restart;

with(plots):

 

F:=kappa->kappa;

proc (kappa) options operator, arrow; kappa end proc

(1)

f:=(alpha,delta)->exp(-abs(F(kappa))^2*(1+delta^2)/2-abs(F(kappa))*alpha)/abs(F(kappa));

proc (alpha, delta) options operator, arrow; exp(-(1/2)*abs(F(kappa))^2*(1+delta^2)-abs(F(kappa))*alpha)/abs(F(kappa)) end proc

(2)

L:=(alpha,delta,Lambda)->(lambda^2*exp(-alpha^2/2)/4)*(Int(f(alpha,delta),kappa= -infinity..-Lambda)+Int(f(alpha,delta),kappa= Lambda..infinity));

proc (alpha, delta, Lambda) options operator, arrow; (1/4)*lambda^2*exp(-(1/2)*alpha^2)*(Int(f(alpha, delta), kappa = -infinity .. -Lambda)+Int(f(alpha, delta), kappa = Lambda .. infinity)) end proc

(3)

evalf(L(4,1,0.001));

0.8209373770e-3*lambda^2

(4)

g:=(beta,delta)->exp(-I*kappa*beta-abs(F(kappa))^2*(1+delta^2)/2)/abs(F(kappa));

proc (beta, delta) options operator, arrow; exp(-I*kappa*beta-(1/2)*abs(F(kappa))^2*(1+delta^2))/abs(F(kappa)) end proc

(5)

E:=(omega,gamma)->exp(I*omega*gamma)*(1-erf((gamma+I*omega)/sqrt(2)));

proc (omega, gamma) options operator, arrow; exp(I*omega*gamma)*(1-erf((gamma+I*omega)/sqrt(2))) end proc

(6)

J:=(alpha,delta,Lambda,beta,gamma)->(lambda^2*exp(-alpha^2/2)/8)*abs(Int(g(beta,delta)*(E(abs(F(kappa)),gamma)+E(abs(F(kappa)),-gamma)),kappa=-infinity..-Lambda)+Int(g(beta,delta)*(E(abs(F(kappa)),gamma)+E(abs(F(kappa)),-gamma)),kappa=Lambda..infinity));

proc (alpha, delta, Lambda, beta, gamma) options operator, arrow; (1/8)*lambda^2*exp(-(1/2)*alpha^2)*abs(Int(g(beta, delta)*(E(abs(F(kappa)), gamma)+E(abs(F(kappa)), -gamma)), kappa = -infinity .. -Lambda)+Int(g(beta, delta)*(E(abs(F(kappa)), gamma)+E(abs(F(kappa)), -gamma)), kappa = Lambda .. infinity)) end proc

(7)

#evalf(J(4,1,0.001,8,3));

N := (beta,alpha)-> (J(alpha,1,0.001,beta,3)-L(alpha,1,0.001))/\lambda^2;

proc (beta, alpha) options operator, arrow; (J(alpha, 1, 0.1e-2, beta, 3)-L(alpha, 1, 0.1e-2))/lambda^2 end proc

(8)

 

 

 

 

 

 

contourplot(evalf(N(beta,alpha)), beta=0..10,alpha=0..10,grid=[25,25]);

 

 

 

 

Download Negativity_v1.mw

I have the function: f(x)= sqrt(x) for x>=0; f(x)=1/x for x<0 and I would like to plot the function.

How exactly to implement this?

restart;
with(plots): with(geometry):
_EnvHorizontalName := 'x':
_EnvVerticalName := 'y':
a := 7:
point(E, 0, a*sqrt(3)/2):
point(B, -a/2, 0):
point(C, a/2, 0):
point(o, 0, a*sqrt(3)/6):
point(A, 0, a/2):
point(H, 0, 0):
R := (3-sqrt(3))*sqrt(2)*a/12:
point(J, 0, a*sqrt(3)/6 - R):
triangle(Tr1, [E, B, C]):
triangle(Tr2, [A, B, C]):
StretchRotation(E1, E, B, Pi/4, clockwise, sqrt(2)/2);
coordinates(E1);
StretchRotation(E2, E, C, Pi/4, counterclockwise, sqrt(2)/2);
coordinates(E2);
triangle(Tr3, [E, B, E1]);
triangle(Tr4, [E, C, E2]);
triangle(Tr5, [B, C, J]);
circle(cir, [point(P1,[0,a*sqrt(3)/6]), R]):
poly := Matrix([[0, a*sqrt(3)/2], [-7/4 + (7*sqrt(3))/4, -7/4 + (7*sqrt(3))/4], [0, a/2], [7/4 - (7*sqrt(3))/4, -7/4 + (7*sqrt(3))/4]], datatype = float);
pol1 := polygonplot(poly, colour = "Magenta", transparency = 0.7, gridlines);
tex := textplot([0.2, a*sqrt(3)/2, "zE"], 'align' = {'above', 'right'});
draw([Tr1(color = cyan),
Tr3(color = green),
tex,
cir(color=blue),
Tr2(color = red),
Tr4(color = grey),
Tr1(color=blue)],'view' = [-5 .. 5, 0 .. 7], 
axes = normal, scaling = constrained,size=[800,800]);
Error, (in geometry:-draw) the option must be of type equation or name
line(L1, [B, o]);
Equation(L1);
line(L1, -(7*x*sqrt(3))/6 + (7*y)/2 - (49*sqrt(3))/12 = 0);
reflection(J1, J, L1);
triangle(Tr6, [B, J1, E]);
line(L2, [C, o]);
Equation(L2);
line(L2, -(7*x*sqrt(3))/6 - (7*y)/2 + (49*sqrt(3))/12 = 0);
reflection(J3, J, L2);
triangle(Tr7, [C, J3, E]);
triangle(T1, [E, J1, A]);
triangle(T2, [E, C, E2]);
triangle(T3, [B, H, J]);
triangle(T4, [C, H, J]);

draw([cir(color = orange, filled = true, transparency = 0.1), pol1, Tr6(color = blue, filled = true, transparency = 0.2), Tr5(color = blue, filled = true, transparency = 0.2), Tr7(color = blue, filled = true, transparency = 0.2), T1(color = green, filled = true, transparency = 0.2), T2(color = green, filled = true, transparency = 0.2), T3(color = green, filled = true, transparency = 0.2), T4(color = green, filled = true, transparency = 0.2)], axes = none, scaling = constrained);
Error, (in geometry:-draw) the option must be of type equation or name
NULL;
NULL;

Why these errors messages ? Thank you.

``

restart:

 

N:=10

10

(1)

PDE:=diff(u(y, t), t) = diff(u(y, t), y, y)

diff(u(y, t), t) = diff(diff(u(y, t), y), y)

(2)

 

ICBC:= {u(y,0) = 0, u(0,t) = cos(t), u(N, t) = 0};

{u(0, t) = cos(t), u(10, t) = 0, u(y, 0) = 0}

(3)

 

sol1:=pdsolve(PDE,ICBC,numeric,spacestep=0.025,timestep=0.00001):

u_at_1 := sol1:-value(u(y,t), t=0.1);

Error, missing operator or `;`

 

u_at_1(0);

[y = 0., t = .1, u(y, t) = HFloat(0.9950041652780257)]

(4)

NULL

Download U.m.mw

Hello im an amateur using maple for my hidraulics machines course at engineering school. Does anyone know how to use the degrees package on maple 2021, i called it out by using the short form. with(Degrees): and then try to use sind but it doesnt recognice the command.

Also when using RPMs the units that should be giving me m/s appear as m2/m*s(radious). I know that the software recognice it as angular speed but is there anyway to eliminate the (radious) so i can work with the speed as lineal?

with(geometry):
_EnvHorizontalName := x:
_EnvVerticalName := y:
a := 7:
b := a*(1/2 + 1/6*sqrt(45 - 24*sqrt(3)))^2:
r := b*sqrt(b)/(sqrt(a + b) + sqrt(a)):
point(A, -a, b): point(B, -a, -b):
point(C, a, -c): point(F, a, b):
Sq := square(Sq, [A, B, C, F]):
circle(C1, [point(P1, [r, 0]), r]):
circle(C2, [point(P2, [(1 + sqrt(3))*r, r]), r]):
circle(C3, [point(P3, [(1 + sqrt(3))*r, -r]), r]):
ellipse(E, x^2/a^2 + y^2/b^2 = 1, [x, y]):
solve({Equation(C1), x^2/a^2 + y^2/b^2 = 1}, {x, y}):
point(T, [5.349255162, 2.829908743]):
IsOnCircle(T, C1);
draw([E(color = cyan), C1(color = yellow, filled = true), T(symbol = solidcircle, symbolsize = 20, color = red), Sq, C2(color = red), C3(color = red),Sq(color=blue)], axes = normal, view = [-a .. a, -b .. b], scaling = constrained);
square: (196+(7*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^2+c)^2)^(1/2)-(196+196*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^4)^(1/2) = 0
square: (7/2)*(1/2+(1/6)*(45-24*3^(1/2))^(1/2))^2-(1/2)*c = 0
Error, (in geometry:-square) not enough information to define a square
                             false

Error, (in geometry:-draw) cannot determine the vertices for drawing .Why all these errors ? Thank you.

EqBIS := proc(P, U, V)
local a, eq1, M1, t, PU, PV, bissec1;
a := (P - U)/LinearAlgebra:-Norm(P - U, 2) + (P - V)/LinearAlgebra:-Norm(P - V, 2);
M1 := P + a*t;
eq1 := op(eliminate({x = M1[1], y = M1[2]}, t));
RETURN(op(eq1[2])); end proc;
EqBIS*([4, 5], [11, 7/3], [11, 5]);
why such a procedure gives no result Thabk you.

 

I have maplesim installed and I get the error "Error, `MapleSim` does not evaluate to a module" when I run A:=MapleSim:-LinkModel(); in a Maple worksheet.

Does anyone know how to solve this error?

Hi guys,

I know how to plot inequality system through using with(plots) and inequal term. however, I couldn't plot following system of inqulity equations:

alpha <= 0.0002500000000*(-18000.*m^2 + 47271.*m + 39514. + sqrt(3.24000000*10^8*m^4 - 1.701756000*10^9*m^3 - 4.266980559*10^9*m^2 - 3.036299412*10^9*m - 6.95987804*10^8))/(9.*m^2 + 12.*m + 4.), 0.00005000000000*(-90000.*m^2 + 237237.*m + 198158. + sqrt(8.100000000*10^9*m^4 - 4.270266000*10^10*m^3 - 1.069976858*10^11*m^2 - 7.612670111*10^10*m - 1.744924704*10^10))/(9.*m^2 + 12.*m + 4.) <= alpha, -0.6666666667 < m, m < -0.6665522013

please let me know how we can plot it.

with best

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