Maple 2018 Questions and Posts

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

Let Q be a quadrilateral which has a inscribed circle and a circumscribed circle. Show that the centers of these 2 circles and the point of intersection of the diagonals
of the quadrilateral are aligned.

restart; unprotect(D, O);

with(plots); with(LinearAlgebra);
Soit Q un quadrilatère qui possède un cercle inscrit et un cercle circonscrit. Montrer que les centres de ces 2 cercles et le point d'intersection des diagonales
du quadrilatère sont alignés.
_EnvHorizontalName := 'x';

_EnvVerticalName := 'y';

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;
EQ := proc (M, N) local eq; eq := (y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1]) end proc;
Pour un quadrilatère A'B'C'D' circonscrit autour d'un cercle avec points de contact A, B, C, D, les droites A'C', B'D', AC, BD sont concourantes
varphi1 := (1/3)*Pi; varphi2 := varphi1+(1/4)*Pi+.1; varphi3 := varphi2+3*Pi*(1/5); varphi4 := 2*Pi-varphi1-varphi2-varphi3; R := 5;
                    varphi4 := -0.514159263
O := [0, 0];
for i to 4 do M || i := [R*cos(varphi || i), R*sin(varphi || i)]; OM || i := plot([O, M || i], color = blue, linestyle = 3); cfOM || i := -1/(diff(solve(EQ(O, M || i), y), x)); eq || i := y = cfOM || i*x+R*sin(varphi || i)-cfOM || i*R*cos(varphi || i); T || i := plot(cfOM || i*x+R*sin(varphi || i)-cfOM || i*R*cos(varphi || i), x = -10 .. 10, color = green) end do;

for i to 4 do j := `mod`(i+1, 4); if j = 0 then j := 4 end if; sol || i := evalf(op(solve([eq || i, eq || j], [x, y]))); P || i := [subs(sol || i, x), subs(sol || i, y)] end do;
for i to 4 do Q || i := geometry:-point(Q || i, P || i[1], P || i[2]) end do;
geometry:-AreConcyclic(Q1, Q2, Q3, Q4, 'cond');
                             false
AC := plot([M1, M3], color = blue);
BD := plot([M2, M4], color = blue);
diago1 := plot([P1, P3], color = coral); diago2 := plot([P2, P4], color = coral);
quadri := plot([seq(M || i, i = 1 .. 4), M1], color = black);
cer := plot([R*cos(t), R*sin(t), t = 0 .. 2*Pi], color = blue);
Points1 := pointplot([seq(M || i[], i = 1 .. 4)], symbol = solidcircle, color = [blue], symbolsize = 15);
Points2 := pointplot([seq(P || i[], i = 1 .. 4)], symbol = solidcircle, color = [green], symbolsize = 15);
Tt1 := plots:-textplot([[M1[], "A"], [M2[], "B"], [M3[], "C"], [M4[], "D"]], font = [times, 10], align = {below, right});
Tt2 := plots:-textplot([[P1[], "A'"], [P2[], "B'"], [P3[], "C'"], [P4[], "D'"], [O[], "O"]], font = [times, 15], align = {above, right});
display([cer, quadri, seq(OM || i, i = 1 .. 4), seq(T || i, i = 1 .. 4), AC, BD, diago1, diago2, Points1, Points2, Tt1, Tt2], axes = none, view = [-9 .. 7, -12 .. 6], scaling = constrained, size = [500, 500]);

Hi !
I have several infinite sommations to evaluate. Maple 2018 on Windows 10 often gives me the solution in terms of hypergeometric functions. I know that the solution can be expressed in terms of sines and cosines.
I am not familiar with sumtools or Sumtools packages.
The convert (expr, StandardFunctions) or simplify (expr, hypergeom) commands do not work.
 
Here is an example of a sommation to evaluate.
 
My old version of Maple V release V (1997 version)  gives me the desired result with the same commands.
 

Is there a command that forces Maple to give me the solution in terms of sines and cosines ?
 
I don't have Mathematica. I hate Mathematica with its difficult syntax but I have access to a computer with Mathematica.
There is a "FunctionExpand" command which converts hypergeometrics into standard functions.
For the previous summation it works very well.
 
Thanks !
Réjean

Hello, 

For a few days Maple crashs everytime i try to use the command "plot3d()". 

I had'nt this problem befor and I have no idea what the reason could be. It ist irrelevant what Funktion I try to visualize,  the window just get closed evertime.

I hope someone can help me.

Thank you!

Tom

The question reads as follows: 

a) Use Maple to find the linear function f(x,y) = c +mx + ny, whose graph passes through the points P=(5,1,0), Q=(-1,7,1), and R = (2,1,4). 

b) Use Maple to graph the linear function whose formula you found in part a.

c) Use Maple to find the (exact) area of the triangle having P,Q and R as vertices. 

Thank you so much. I am new to Maple and just trying to figure it all out.  

I am trying to write a program for the representation of a function F with three variables i, j, x, where i, j are non-negative integers and x is real. I have tried with different indexings like F(i,j,x), F[i](j,x), F[i,j](x), but did not get the desired result. My objective is to get F as a function of i, j, x.

Here is my maple code with detailed description of my problems in each step.

 

test1702.mw

Plot the Vector Field f(x,y,z) = (-x,y,cos z).

How do I go about plotting this? I have tried everything and nothing is working for me. 

a1 := 5; b1 := 3; a2 := 3; b2 := 4; a3 := 3; b3 := 7; eq1 := expand((y-2)^2/b1^2+(x-5)^2/a1^2 = 1); 1 2 4 13 1 2 2 eq1 := - y - - y + -- + -- x - - x = 1 9 9 9 25 5 eq2 := expand((y+2)^2/b2^2+(x+1)^2/a2^2 = 1); 1 2 1 13 1 2 2 eq2 := -- y + - y + -- + - x + - x = 1 16 4 36 9 9 Sys := {eq1, eq2}; Sol := [solve(Sys, explicit)]; L := map(proc (t) options operator, arrow; eval([x, y], t) end proc, simplify(`~`[fnormal](evalf(Sol), 9), zero)):I don't want complex roots. Tank you.

Can you please help me in telling different ways to speed up the following code. thank you.

 

thread_map.mw

Can you guess what P() produces, without executing it?

P:=proc(N:=infinity) local q,r,t,k,n,l,h, f;
q,r,t,k,n,l,h := 1,0,1,1,3,3,0:
while h<N do 
   if 4*q+r-t < n*t
   then f:=`if`(++h mod 50=0,"\n",`if`(h mod 10=0," ","")); printf("%d"||f,n);   
        q,r,t,k,n,l := 10*q,10*(r-n*t),t,k,iquo(10*(3*q+r),t)-10*n,l
   else q,r,t,k,n,l := q*k,(2*q+r)*l,t*l,k+1,iquo(q*(7*k+2)+r*l,t*l),l+2
   fi
od: NULL
end:

I hope you will like it (maybe after execution).

While using the Physics package in Maple 2018, I am facing a few hurdles. In the file tov.mw ,

1. I have defined a dual-vector with components $u_a$ in step 12, but when I am trying to compute $g(u,u)$ using SumOverRepeatedIndices  in step 15, it is not evaluating the sum.

2. I want to define a tensor $B_{ab}=\nabla_a u_b$. Do I just write Define(B{a,b}=D_[a] u[b]) ?

3. Is there any command to find the symmetric and antisymmetric components and trace of the tensor B or do we evaluate them by writing out the expressions?

Thank you.

restart; with(plots); _EnvHorizontalName := 'x'; _EnvVerticalName := 'y'; para := -2*p*x+y^2 = 0; para1 := -2*p1*x+y^2 = 0; t := y-m*x-p/(2*m) = 0; t1 := y+x/m+(1/2)*p1*m = 0; sol := op(solve([t, t1], [x, y])); eliminate({rhs(sol[1]), rhs(sol[2])}, m); for example : m := 2; p := 1; p1 := -2; PARA := implicitplot(para, x = -3 .. 3, y = -3 .. 3, color = blue); PARA1 := implicitplot(para1, x = -3 .. 3, y = -3 .. 3, color = green); Tang := implicitplot(t, x = -3 .. 3, y = -3 .. 3, color = brown); Tang1 := implicitplot(t1, x = -3 .. 3, y = -3 .. 3, color = aquamarine); NULL; #m is not constant display([PARA, PARA1, Tang, Tang1], view = [-3 .. 3, -3 .. 3], scaling = constrained);#on what curve is the vertex of the angle of 2 tangents ? Thank you.

Hi,

I want to optimize a function f(g(e(x),x))  where g(x) is interpolated and e(x) is not known when the interpolation object is created. I found the intpolation Methods of Maple 2018 very helpful to quickly change the inpterpolation method.

Unfotunately the optimization fails when the interpolation object receives an expression as input.

It works if I just use x. Do you know my the first approach fails?

Is there maybe a way to convert the interpolation object to a piecewise function?

 

Thank you for your help
 

# Optimize with Interpolation Object


points :=  <<0.4000|  10.0000>,
            <0.7000|   10.0000>,
            <1.0000|   10.0000>,
            <0.3000|   30.0000>,
            <0.4000|   30.0000>,
            <0.5000|   30.0000>>;

Data := <0617,0767,0220,0444,0692,0789>*0.001;

intmethod := LinearInterpolation;

g := Interpolation[intmethod](points(1..-1,1),Data):

Matrix(6, 2, {(1, 1) = .4000, (1, 2) = 10.0000, (2, 1) = .7000, (2, 2) = 10.0000, (3, 1) = 1.0000, (3, 2) = 10.0000, (4, 1) = .3000, (4, 2) = 30.0000, (5, 1) = .4000, (5, 2) = 30.0000, (6, 1) = .5000, (6, 2) = 30.0000})

 

Vector[column](%id = 18446884324022199230)

 

LinearInterpolation

(1)

plot(g(x),x=0..1)

 

e := x/sqrt(2);

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

(2)

f := 5+g(e)*x^2

"5+(module() ... end module)(module() ... end module,1/2 x sqrt(2)) x^2"

(3)

f_simple := 5+g(x)*x^2

"f_simple:=5+[[["a linear interpolation object"],["with 6 points in 1-D"]]](x) x^2"

(4)

op_f := Optimization[Minimize](f(x),x=0 .. 1);

Error, (in Optimization:-NLPSolve) non-numeric result encountered

 

op_f_simple := Optimization[Minimize](f_simple(x),x=0 .. 1);

[HFloat(4.999979117244145), [x = HFloat(0.028901647183245588)]]

(5)

 

NULL


 

Download convert_interpolation_object.mw

 

 

Dear Sir/Madam, I am new in maple and willing to use an old (yet tested) Maple V code. The program first evaluates two integrals numerically, which depend on the values of "d" and "s" (user-defined), and then computes the values of a cumulative distribution function. The problem is that, when running the code on Maple 2018, the evalf(Int) of the first integrand (named "ex1") results in "Float (undefined)". I would really appreciate your help. Thank you in advance.

 

#Maple V program

assume(x, real, y, real, c1, real, c2, real);
d := 3:
s := .9:
ex1:=(1-exp(-(d-y)*I*x))/I/x*exp(y*I*x/(1-I*x)):
ex1:=simplify(Re(evalc(ex1))):
f1:= unapply(ex1,x,y):
ex2:=(1-exp(-(d-y)*I*x))/I/x*exp(y*I*x/(1-I*x))/(1-I*x):
ex2:=simplify(Re(evalc(ex2))):
f2:=unapply(ex2,x,y):
t1:=evalf(Int(f1(x,s),x=-infinity..infinity));
t2:=evalf(Int(f2(x,s),x=-infinity..infinity));
cumulativeprob:=evalf(subs(c1=1/2,c2=1/2,1-((c1*t1+c2*t2)/(2*Pi)+c1*exp(-s)/2)));

cumulativeprob:=.2503779941

 

How do I simplify KdV equation in Maple by using =fxt))xx)?)


 

``

   I am by using =2*difffxtxx)
    My aim is to get the form
   diff((f*(diff(f, x, t))-(diff(f, x))*(diff(f, t))+f*(diff(f, x, x, x))-4*(diff(f, x, x, x))*(diff(f, x))+3*(diff(f, x, x))^2)/f^2, x) = 0

NULL

``

restart; with(PDEtools); with(DEtools)

``

alias(u = u(x, t)); declare(u(x, t)); alias(f = f(x, t)); declare(f(x, t))

u

 

` u`(x, t)*`will now be displayed as`*u

 

u, f

 

` f`(x, t)*`will now be displayed as`*f

(1)

KdV := diff(u, t)+6*u.(diff(u, x))+diff(u, x, x, x) = 0

diff(u, t)+6*(u.(diff(u, x)))+diff(diff(diff(u, x), x), x) = 0

(2)

KdV_f := eval(KdV, u = 2*(diff(ln(f), x, x)))

2*(diff(diff(diff(f, t), x), x))/f-2*(diff(diff(f, x), x))*(diff(f, t))/f^2-4*(diff(f, x))*(diff(diff(f, t), x))/f^2+4*(diff(f, x))^2*(diff(f, t))/f^3+6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x))/f-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x))/f^2+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2/f^3-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))/f^2-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+60*(diff(diff(f, x), x))^2*(diff(f, x))/f^3+48*(diff(f, x))^5/f^5 = 0

(3)

df := collect(KdV_f, f)

6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+(2*(diff(diff(diff(f, t), x), x))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x)))/f+(-2*(diff(diff(f, x), x))*(diff(f, t))-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))-4*(diff(f, x))*(diff(diff(f, t), x))-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x)))/f^2+(60*(diff(diff(f, x), x))^2*(diff(f, x))+4*(diff(f, x))^2*(diff(f, t))+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2)/f^3-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+48*(diff(f, x))^5/f^5 = 0

(4)

factor(simplify(df, size))

2*(12*(((diff(diff(f, x), x))*f-(diff(f, x))^2)/f^2.(((diff(diff(diff(f, x), x), x))*f^2-3*(diff(diff(f, x), x))*(diff(f, x))*f+2*(diff(f, x))^3)/f^3))*f^5+f^4*(diff(diff(diff(f, t), x), x))+f^4*(diff(diff(diff(diff(diff(f, x), x), x), x), x))-f^3*(diff(diff(f, x), x))*(diff(f, t))-10*f^3*(diff(diff(f, x), x))*(diff(diff(diff(f, x), x), x))-2*f^3*(diff(f, x))*(diff(diff(f, t), x))-5*f^3*(diff(f, x))*(diff(diff(diff(diff(f, x), x), x), x))+30*f^2*(diff(diff(f, x), x))^2*(diff(f, x))+2*f^2*(diff(f, t))*(diff(f, x))^2+20*f^2*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2-60*(diff(diff(f, x), x))*(diff(f, x))^3*f+24*(diff(f, x))^5)/f^5 = 0

(5)

``

``

``

``


 

Download KdV_simplify

First 15 16 17 18 19 20 21 Last Page 17 of 61