Maple 2018 Questions and Posts

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

I am trying to solve this equation, I tried
 

restart; 
ListTools[Categorize]; 
L := []; 
for a to 20 do
 for b to 20 do 
for c to 20 do 
for d to 20 do 
for e to 20 do 
for f to 20 do 
for g to 20 do 
for h to 20 do 
if sqrt(a+b*sqrt(c+d*sqrt(e +f*sqrt(g)))) = h then L := [op(L), [a, b, c, d, e, f, g, h]] end if
 end do end do end do end do end do end do end do end do; nops(L)

where g is not a square of a integer number . I do not get any solutions for a long time. How to reduce timing to solve this equation?

 

This question came to me when I answered in this thread  https://www.mapleprimes.com/questions/231603-Solve-Onevariable-Equation

The equation there is quite cumbersome, I extracted a shorter subexpression from it (I converted all floats to exact constants), but the  solve  command hangs when trying to solve it. fsolve  handles the equation easily. We can see that the equation  Eq  is quite simple and easy to solve even by hand. I ask this question in a separate topic, because this seems to be a serious bug in the  solve  command.

restart;
Eq:=1-1/(1+203808*exp(-342569/506*t)*(1/131537))^(131537/203808)=44983/56599;
solve(Eq);

                    

 

Edit. I noticed that the  isolate  command solves the problem, but of course the question remains open with  solve .

How to plot absolute value in dsolve?
absolute_plot.mw

Plotting in the first coordinate in the plane......

I know that, tetrahedron with vertices (0, 0, 0), (3, 0, 0), (0, 5, 0), (0, 0, 14) has center of insphere is  (1, 1, 1) and radius R = 1. How to create a tetrahedron whose coordinates of all vertices are integers, the inscribed spherical center and the inscribed spherical radius are integers?

restart; _local(D); A := [-L, 0]; B := [L, 0]; C := [x, y]; D := [-x, y]; Dist := proc (X, Y) options operator, arrow; sqrt((X[1]-Y[1])^2+(X[2]-Y[2])^2) end proc; Eq := (Dist(C, D) = Dist(C, B))^2; centre := [solve(diff(Eq, x), x), solve(diff(Eq, y), y)]; with(geometry); `assuming`([conic(p, Eq, [x, y])], [L > 0]); detail(p); asymptotes(p); y_acymp := `~`[solve](`~`[Equation](asymptotes(p)), y); y := solve(Eq, y)[1] P := proc (X, L0) local Curve, Asymptote, Trapezoid, T, pt, Ip; Curve := plot(eval([y, -y], L = L0), x = -(1/3)*L0 .. 15, color = red, thickness = 3); Asymptote := plot(eval([-sqrt(3)*x-(1/3)*sqrt(3)*L, sqrt(3)*x+(1/3)*sqrt(3)*L], L = L0), x = -(1/3)*L0 .. 15, linestyle = 3, color = black, thickness = 0); Trapezoid := plottools:-polygon(eval([A, B, C, D], [L = L0, x = X]), color = "LightGreen"); Ip := (1/3)*(eval(C, [x = X-(1/3)*L0, L = L0])); #centre of gravity of ABC T := plots:-textplot([[(eval(A, [x = X, L = L0]))[], "A"], [(eval(B, [x = X, L = L0]))[], "B"], [(eval(C, [x = X, L = L0]))[], "C"], [(eval(D, [x = X, L = L0]))[], "D"], [Ip[], "I"]], align = {above, left}, font = [TIMES, 16]); pt := plot([A, B, C, Ip], style = plottools:-point, color = blue, symbolsize = 15); plots:-display(Curve, Asymptote, Trapezoid, T, pt, scaling = constrained, size = [400, 800]) end proc; a := 7; P((1/2)*a, 6) I would like of location of centre of gravity of ABC. Thank you.

This  is a question from https://mathematica.stackexchange.com/questions/239055/how-to-reduce-the-time-to-solve-this-system-of-equations. How to reduce the time in Maple?
 

  {x, y, z, a, b, m, n} /. Solve[{1/x + 1/y == 1/z, a/x  + b/y == m/n, 2 <= x <= 30, 2 <= y <= 30, 1 <= z <= 30, 2 <= a <= 10, 2 <= b <= 10, a > b, 2 <= m <= 10, 2 <= n <= 10, x > y, GCD[m, n] == 1, GCD[a, b, m] == 1, m <= n}, {x, y, z, a, b, m, n}, Integers]

I am trying to find one option so that  a sphere is tangent with every edge of a tetrahedron. Suppose tetrahedron OABC, here O(0,0,0), A(x1, y1, z1), B(x2, y2, z2), and C(x3, y3, z3).  How to find a sphere is tangent with every edge of a tetrahedron?

I know how to contruct an isoscele ABCD trapeze knowing the 2L length of AB and BC=CD=CD=a. But I don't know answer to that question : L being fixed together with points A and B , show that the place of C when a varies is a branch of hyberbola. Here is my code.

restart; unprotect(O, D);
with(plots):
Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end:
_EnvHorizontalName := x: _EnvVerticalName := y:
O:=[0,0]:A:=[-L,0]:alpha:=arccos((2*L-a)^2/(2*a*(2*L-a))):h:=tan(alpha)*(2*L-a)/2:
B:=[L,0]:C:=[L-(2*L-a)/2,h]:D:=[-L+(2*L-a)/2,h]:
L := 6; a := 7;
poly := [A, B, C, D, A];tp := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"]], color = black, 'align' = {'above', 'right'});
trapeze := polygonplot(poly, axes = normal, color = "DarkGreen", transparency = .9);
display([tp, trapeze], scaling = constrained); Thank you foryour help.

We consider an ellipse  E defined by the equation x²/a²+y²/b²=1. Either F1 and F2 its foci. 
We consider a point M of E  such the angle F1,M,F2 is equal to a given value phi.
Find F1M et F2M in function of a, b and phi . Then find the coordiinates x0 and y0 of M in function of a, b, and phi. Here is the begining of my code;

restart;
_EnvHorizontalName := x: _EnvVerticalName := y:
with(plots):
line := proc (x1, y1, x2, y2) options operator, arrow; (x-x1)*(y2-y1)-(y-y1)*(x2-x1) end proc:
Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:

ell := x^2/a^2+y^2/b^2 = 1: 
c := sqrt(a^2-b^2):
F1 := [c, 0]: F2 := [-c, 0]:
M := [a*cos(t), b*sin(t)]:
MF2 := simplify(expand(sqrt((c+a*cos(t))^2+(b*sin(t))^2)));
MF1 := simplify(expand(sqrt((c-a*cos(t))^2+(b*sin(t))^2)));
varphi := arccos((MF1^2+MF2^2-4*c^2)/(2*MF1*MF2));
f := unapply(varphi, t);
`max&varphi;` := f((1/2)*Pi);
diff(f(t), t);

a := 7: b := 5: t := (1/3)*Pi:
evalf(varphi);
evalf(MF1); evalf(dist(M, F1));
evalf(MF2); evalf(dist(M, F2));
MF1+MF2; evalf(%);
`max&varphi;`; evalf(%);
ELL := implicitplot(ell, x = -a-2 .. a+2, y = -2-b .. b+2, color = blue):
tp := textplot([[F1[], "F1"],[F2[],"F2"],[M[],"M"]], 'align' = {'above', 'left'}):
po := plot([F1,F2, M], style = point, symbolsize = 15, symbol = solidcircle, color = red):

display([ELL, tp, po], scaling = constrained): Would  you help me to answer the questions ? Thank you.

Hi. i have a nonlinear integral equation. any idea for solving it? tnx in advance

integral-equation.mw

 

How to simplify this trigonometric expression with Maple? I only know the way with  identify command, which is difficult to call mathematically correct:

restart;
Expr:=arctan((1-tan(20*Pi/180))/(1-tan(25*Pi/180)));
evalf[15](Expr);
identify(%);

                           

        

 

Hello. Please help me find the value of the integral.

Integral.mw

How to write names on an drawing P1, P2, P3, Pn... I try
textplot({seq([(coordinates(point(P[i]))), cat("P", i)], i = 0 .. 5)}, 'align' = {'above', 'left'}):;
i got the message : wrong number of arguments that i don't how correct. Thank you.

restart; with(plots):unprotect(gamma):
_EnvHorizontalName := 'x';_EnvVerticalName := 'y';
line := proc (x1, y1, x2, y2) options operator, arrow; (x-x1)*(y2-y1)-(y-y1)*(x2-x1) end proc:
R := 3:
ang := [0, (1/3)*Pi, 3*Pi*(1/4)+.2, 7*Pi*(1/6)+.4, 8*Pi*(1/5), 13*Pi*(1/7)]:
for i to 6 do P || i := [R*cos(ang[i]), R*sin(ang[i])] end do:
pts := [seq(P || i, i = 1 .. 6)]:
for i to 6 do tang || i := x*P || i[1]+y*P || i[2] = R^2 end do:
sol:=solve({tang1,tang3},{x,y}):Q13:=[subs(sol,x),subs(sol,y)]:
sol := solve({tang1, tang2}, {x, y}): Q1 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang2, tang3}, {x, y}): Q2 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang3, tang4}, {x, y}): Q3 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang4, tang5}, {x, y}): Q4 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang5, tang6}, {x, y}): Q5 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang1, tang6}, {x, y}): Q6 := [subs(sol, x), subs(sol, y)]:
ptQ := [seq(Q || i, i = 1 .. 6)]:
line14 := line(Q1[1], Q1[2], Q4[1], Q4[2]): L14 := implicitplot(line14, x = -10 .. 10, y = -10 .. 10, color = red):
line25 := line(Q2[1], Q2[2], Q5[1], Q5[2]): L25 := implicitplot(line25, x = -10 .. 10, y = -10 .. 10, color = red):
line36 := line(Q3[1], Q3[2], Q6[1], Q6[2]): L36 := implicitplot(line36, x = -10 .. 10, y = -10 .. 10, color = red):
sol := solve({line14, line25}, {x, y}): I1 := [subs(sol, x), subs(sol, y)]:

lineP23 := line(P2[1], P2[2], P3[1], P3[2]): lineP56 := line(P5[1], P5[2], P6[1], P6[2]):
sol := solve({lineP23, lineP56}, {x, y}): gamma := [subs(sol, x), subs(sol, y)]:
lineP12 := line(P1[1], P1[2], P2[1], P2[2]): lineP45 := line(P4[1], P4[2], P5[1], P5[2]):
sol := solve({lineP12, lineP45}, {x, y}): beta := [subs(sol, x), subs(sol, y)]:
lineP34 := line(P3[1], P3[2], P4[1], P4[2]): lineP16 := line(P1[1], P1[2], P6[1], P6[2]):
sol := solve({lineP16, lineP34}, {x, y}): alpha := [subs(sol, x), subs(sol, y)]:
pl:= line(alpha[1], alpha[2], gamma[1], gamma[2]):
hexa := seq(implicitplot(tang||i, x = -20 .. 20, y = -20 .. 20, linestyle=3,color = blue),i=1..6):
#hexa:=plot([seq([P||i,P||(i mod 6)+1],i=1..6),color=green): 
#hexa:=plot([seq([P||i,P||(i+1)],i=1..6)],thickness=4,color=green): 
hex:=plot([[Q1,Q2],[Q2,Q3],[Q3,Q4],[Q4,Q5],[Q5,Q6],[Q6,Q1]],thickness=4,color=green):
tp := textplot({seq([op(pts[i]), cat("P", i)], i = 1 .. 6)}, 'align' = {'above', 'left'}):
tpq := textplot({seq([op(ptQ[i]), cat("Q", i)], i = 1 .. 6)}, 'align' = {'above', 'left'}):
TP:=textplot([[I1[],"I"],[alpha[],"alpha"],[beta[],"beta"],[gamma[],"gamma"]],'align' = {'above', 'left'}):
slopes:=[seq(((dx,dy)->dy/dx)((pts[i]-pts[(i mod 6)+1])[]),i=1..6)]:
lines:=zip((pt,slope)->y=slope*(x-pt[1])+pt[2],pts,slopes):
plotpts:=plot(pts,style=point,colour=red,symbol=solidcircle,symbolsize=5):
plotptQ:=plot(ptQ,style=point,colour=black,symbol=solidcircle,symbolsize=5):
plotlines:=plot(rhs~(lines),style=line,linestyle=3,colour=magenta):
cir:=implicitplot(x^2+y^2=R^2,x=-R..R,y=-R..R,color=black):
PL:=implicitplot(pl,x=-1..15,y=-15..6,color=blue,thickness=3):
display(plotpts,plotptQ,plotlines,hex,cir,L14,L25,L36,PL,tp,tpq,TP,axis = [gridlines = [4, color = blue]],
view=[-6..10,-15..6],scaling=constrained,axes=none,size=[800,800]):
How to simplify this program ? Thank you.

Hello. I have certain requirements for drawings. Please tell me, is it possible to implement them when plotting in Maple? Thanks.
Drawing width 15 cm
Be sure to frame and mesh. The thickness of the frame and serifs on the axes is 0.5 pt. Mesh thickness 0.25 pt. The length of the serifs is 1.2 mm.
The thickness of the graph itself is 1 pt
Axis names 10 pt

First 9 10 11 12 13 14 15 Last Page 11 of 62