Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi everyone, I buy a new laptop with high resolution (2560x1600), I wanna zoom in the size of toolbar (like the icon size of File, Edit, View,......). I modify the fontsize, so for well-proportioned I wanna modify the icon size but I failed.


 

How can I make some triangles in a bigger triangle knowing its perimeters like this picture?

Hello everyone,

I successfully plotted the intersection point of two linear equations using a matrix-based approach. Still, I’m facing an issue when trying to achieve the same result using the second method — solving the system symbolically and plotting without matrices.

The Matrix-Based Approach (Working): I used the following steps to plot both equations and mark the intersection point (solution). However, when I switch to solving the system symbolically without matrices, I can plot the two lines, but I'm unable to plot the intersection point correctly.

It seems that the symbolic solution isn't being properly converted to a numeric form for pointplot, even though I’m using evalf.

Any help would be greatly appreciated!

Download Linear_System.mw

Hi,
How can I remove the mentioned error in attached worksheet?

s1.mw

The EKHAD package from the book A=B (https://www2.math.upenn.edu/~wilf/AeqB.html) contains many effective algorithms. I want to use one of them in Maple, but I have troubles with the command `read`.

I saved the file from this link: https://sites.math.rutgers.edu/~zeilberg/tokhniot/EKHAD and followed the instructions at the beggining:
    #######################################################################
    ## EKHAD: Save this file as EKHAD. To use it, stay in the             #
    ## same directory, get into Maple (by typing: maple <Enter> )         #
    ## and then type:  read EKHAD : <Enter>                               #
    ## Then follow the instructions given there                           #
    ##                                                                    #
    ## Written by Doron Zeilberger, Rutgers University ,                  #
    ##  zeilberg@math.rutgers.edu.                                        # 
    #######################################################################

 After running the EKHAD file, I got:

     Last update: April 26, 2018, thanks to Daniel G. DuParc

       Previous updates:   Dec. 11, 2015 (adding procedures AZdI, 

        AZcI ); May 30, 2015 (adding procedure TerryTao )


                  May 29, 2014 (adding Ekhad )

              Version of July 2003: adapted to Maple 8 and 9 

                   Many thanks to Drew Sills

         In the penultimate Version of Feb 25, 1999 a suggestion

         of Frederic Chyzak was used, with considerable 

                speed-up. We thank him SO MUCH!


             The penpenultimate version, Feb. 1997,

      corrected a subtle bug discovered by Helmut Prodinger


           Previous versions benefited from comments by Paula Cohen, 

                 Lyle Ramshaw, and Bob Sulanke.


            This is EKHAD, One of the Maple packages

                     accompanying the book 

                             "A=B" 

          (published by A.K. Peters, Wellesley, 1996) 

      by Marko Petkovsek, Herb Wilf, and Doron Zeilberger.


        The most current version is available on WWW at:

            http://www.math.rutgers.edu/~zeilberg .

       Information about the book, and how to order it, can be found in

       http://www.central.cis.upenn.edu/~wilf/AeqB.html .

     Please report all bugs to: zeilberg@math.rutgers.edu .

            All bugs or other comments used will be acknowledged in future

                           versions.


    For general help, and a list of the available functions,

     type "ezra();". For specific help type "ezra(procedure_name)" 

           NULL;
 

Then I opened new document in same directory as in instructions and typed `read EKHAD.mw`, but I got the following error:


Error, on line %1, syntax error, character `?` unexpected:
<?xml version="1.0" encoding="UTF-8"?>
 ^

Error, while reading `%1`


I don't know what this error means and how to fix it. For both errors, after clicking on them, It sends me to the website where it says:

There is no help page available for this error

Sorry, we do not have specific information about your error. 

Thank you very much for your help. 

restart;
with(plots);
A := [0, 0];
B := [4, 2];
C := [2, 3];
distance := proc(P1, P2) sqrt((P1[1] - P2[1])^2 + (P1[2] - P2[2])^2); end proc;
plot_triangle := proc(A, B, C) plot([A, B, C, A], style = line, color = black, thickness = 2); end proc;
plot_bisectors := proc(A, B, C) local AB, BC, CA, AB_bisector, BC_bisector, CA_bisector, i; AB := [A, B]; BC := [B, C]; CA := [C, A]; AB_bisector := [seq(A[i] + t*(B[i] - A[i]), i = 1 .. 2)]; BC_bisector := [seq(B[i] + t*(C[i] - B[i]), i = 1 .. 2)]; CA_bisector := [seq(C[i] + t*(A[i] - C[i]), i = 1 .. 2)]; plot([AB_bisector, BC_bisector, CA_bisector], t = 0 .. 1, style = line, color = blue, thickness = 2); end proc;
plot_apollonius := proc(A, B, C, ratio) local f, g; f := (x, y) -> sqrt((x - A[1])^2 + (y - A[2])^2)/sqrt((x - B[1])^2 + (y - B[2])^2) - ratio; g := implicitplot(f(x, y), x = -5 .. 5, y = -5 .. 5, grid = [100, 100], style = line, color = red, thickness = 2); g; end proc;
plot_inscribed_circle := proc(A, B, C) local a, b, c, s, r, Ii; a := distance(B, C); b := distance(A, C); c := distance(A, B); s := 1/2*a + 1/2*b + 1/2*c; r := sqrt((s - a)*(s - b)*(s - c)/s); Ii := [(a*A[1] + b*B[1] + c*C[1])/(a + b + c), (a*A[2] + b*B[2] + c*C[2])/(a + b + c)]; plot(circle(Ii, r), style = line, color = green, thickness = 2); end proc;
plot_exscribed_circles := proc(A, B, C) local a, b, c, s, rA, rB, rC, IA, IB, IC; a := distance(B, C); b := distance(A, C); c := distance(A, B); s := 1/2*a + 1/2*b + 1/2*c; rA := sqrt((s - b)*(s - c)*s/(s - a)); rB := sqrt((s - a)*(s - c)*s/(s - b)); rC := sqrt((s - a)*(s - b)*s/(s - c)); IA := [(a*A[1] - b*B[1] + c*C[1])/(a - b + c), (a*A[2] - b*B[2] + c*C[2])/(a - b + c)]; IB := [(a*A[1] + b*B[1] - c*C[1])/(a + b - c), (a*A[2] + b*B[2] - c*C[2])/(a + b - c)]; IC := [(-a*A[1] + b*B[1] + c*C[1])/(-a + b + c), (-a*A[2] + b*B[2] + c*C[2])/(-a + b + c)]; plot([circle(IA, rA), circle(IB, rB), circle(IC, rC)], style = line, color = magenta, thickness = 2); end proc;
with(geometry);
point(A1, 0, 0);
point(B1, 4, 2);
point(C1, 2, 3);
tx := textplot([[coordinates(A1)[], "A"], [coordinates(B1)[], "B"], [coordinates(C1)[], "C"]], font = [times, bold, 16], align = [above, left]);
triangle_plot := plot_triangle(A, B, C);
restart;
with(plots);
A := [0, 0];
B := [4, 2];
C := [2, 3];
distance := proc(P1, P2) sqrt((P1[1] - P2[1])^2 + (P1[2] - P2[2])^2); end proc;
plot_triangle := proc(A, B, C) plot([A, B, C, A], style = line, color = black, thickness = 2); end proc;
plot_bisectors := proc(A, B, C) local AB, BC, CA, AB_bisector, BC_bisector, CA_bisector, i; AB := [A, B]; BC := [B, C]; CA := [C, A]; AB_bisector := [seq(A[i] + t*(B[i] - A[i]), i = 1 .. 2)]; BC_bisector := [seq(B[i] + t*(C[i] - B[i]), i = 1 .. 2)]; CA_bisector := [seq(C[i] + t*(A[i] - C[i]), i = 1 .. 2)]; plot([AB_bisector, BC_bisector, CA_bisector], t = 0 .. 1, style = line, color = blue, thickness = 2); end proc;
plot_apollonius := proc(A, B, C, ratio) local f, g; f := (x, y) -> sqrt((x - A[1])^2 + (y - A[2])^2)/sqrt((x - B[1])^2 + (y - B[2])^2) - ratio; g := implicitplot(f(x, y), x = -5 .. 5, y = -5 .. 5, grid = [100, 100], style = line, color = red, thickness = 2); g; end proc;
plot_inscribed_circle := proc(A, B, C) local a, b, c, s, r, Ii; a := distance(B, C); b := distance(A, C); c := distance(A, B); s := 1/2*a + 1/2*b + 1/2*c; r := sqrt((s - a)*(s - b)*(s - c)/s); Ii := [(a*A[1] + b*B[1] + c*C[1])/(a + b + c), (a*A[2] + b*B[2] + c*C[2])/(a + b + c)]; plot(circle(Ii, r), style = line, color = green, thickness = 2); end proc;
plot_exscribed_circles := proc(A, B, C) local a, b, c, s, rA, rB, rC, IA, IB, IC; a := distance(B, C); b := distance(A, C); c := distance(A, B); s := 1/2*a + 1/2*b + 1/2*c; rA := sqrt((s - b)*(s - c)*s/(s - a)); rB := sqrt((s - a)*(s - c)*s/(s - b)); rC := sqrt((s - a)*(s - b)*s/(s - c)); IA := [(a*A[1] - b*B[1] + c*C[1])/(a - b + c), (a*A[2] - b*B[2] + c*C[2])/(a - b + c)]; IB := [(a*A[1] + b*B[1] - c*C[1])/(a + b - c), (a*A[2] + b*B[2] - c*C[2])/(a + b - c)]; IC := [(-a*A[1] + b*B[1] + c*C[1])/(-a + b + c), (-a*A[2] + b*B[2] + c*C[2])/(-a + b + c)]; plot([circle(IA, rA), circle(IB, rB), circle(IC, rC)], style = line, color = magenta, thickness = 2); end proc;
with(geometry);
point(A1, 0, 0);
point(B1, 4, 2);
point(C1, 2, 3);
tx := textplot([[coordinates(A1)[], "A"], [coordinates(B1)[], "B"], [coordinates(C1)[], "C"]], font = [times, bold, 16], align = [above, left]);
triangle_plot := plot_triangle(A, B, C);
bisectors_plot := plot_bisectors(A, B, C);
apollonius_plot := plot_apollonius(A, B, C, 1);
with(geometry);
inscribed_circle_plot := plot_inscribed_circle(A, B, C);
exscribed_circles_plot := plot_exscribed_circles(A, B, C);
display(triangle_plot, tx, bisectors_plot, apollonius_plot, axes = none, scaling = constrained, title = "Triangle with Bisectors, Apollonius Hyperbola, and Circles");
Error, (in plot) cannot determine plotting variable
Error, (in plot) cannot determine plotting variable
Warning, data could not be converted to float Matrix
Can you tel why these errors mean ? Thank you.
 

On my journey of discovery in the Maple world, which is new to me, I have now looked at the linear algebra packages. I am less interested in numerics than in symbolic calculations using matrices. I would like to illustrate this with the following task:

Let A be any regular (n; n) matrix over the real numbers for natural n. The regular (n; n) matrix X that solves the equation

X - A^(-1)*X*A = 0 for each A is to be determined. In this, A^(-1) is the inverse of A. Is there perhaps a symbolic solution for a specifically chosen n?

The solution to this old exercise is known. X is every real multiple of the unit/identity matrix, i.e. the main diagonal is occupied by a constant and all other matrix elements are zero.

Hi everyone, maybe this question is a picky cause handling with such issue is much more suitable for GeoGebra but I just wanna try. I wanna the output figure like below (NVM the sequence of pointname). As for my Maple output, I wanna: the vertex names and vertices should not overlap, keep a little distance to make it more beautiful. Moreover, how to color the planar BDD_1B_1 graph?


The below is Maple code:

NULL

with(plots); with(plottools)

display(cuboid([0, 0, 0], [1, 1, 1]), transparency = .6, scaling = constrained, size = [200, 200], axes = boxed, orientation = [-54, 78, 5], tickmarks = [0, 0, 0])

 

p1 := display(line([0, 0, 0], [1, 1, 1]), axes = boxed, color = black, linestyle = dash, orientation = [-54, 78, 5], scaling = constrained, size = [200, 200], tickmarks = [0, 0, 0])

 

Pointsname := textplot3d({[0, 0, 0, A], [0, 0, 1, A[1]], [0, 1, 0, D], [0, 1, 1, D[1]], [1, 0, 0, B], [1, 0, 1, B[1]], [1, 1, 0, C], [1, 1, 1, C[1]]}, axes = none, size = [200, 200]); P := plot3d(Points, style = point, color = "Black", symbol = solidcircle, symbolsize = 10, size = [200, 200], tickmarks = [0, 0, 0]); display({p1, Pointsname}, style = line)

 

 

 

NULL


 

Download cubic.mw

Error.mw
As the title, I try to solve an ODE:

y(x) = (x - 1)*(x - 3)*diff(y(x), x) + f((x*y(x)^2 - 4*x*y(x) + 3*x - y(x)^2 + 4*y(x) - 1)/(x - 3))
And it seems that the ODE can be solved using Lie Symmetry method. But as I choose f to be a simple exponential function, dsolve fails to give the solution. I also try the DEtools[symgen] and receive the same result.

Can anyone tell me what's the problem? Is there some internal bug?

Executing the code in ?InvertedPendulum produces an error when

sysLin := Linearize(convert(sysEqs, list), [u(t)], [x(t), theta(t)], lin_point)

is executed. The problem is the line where EQ4 is assigned a value.

Something is wrong with the line where EQ4 is assigned a value. It is not executed.
It is like the mode changes to text for that line????

I thought I had post with collection showing timelimit still hangs in Maple. But can't find it searching. I wanted to add this to it.

If someone finds such post, please let me know and I will append this to that post and delete this.

I just found another example where int() hangs all of Maple, using timelimit. I put timelimit of 30 seconds. After 2 hrs it is still running.

Maple 2024.1 on windows 10. This shows clearly that timelimit in Maple still does not work when It was supposed to have been fixed in Maple 2021?

For me, if there is anything that will make me stop using Maple for good, it is this timelimit issue.

Because with timelimit not working all the time, my program keeps hanging. It is not possible to do antything then. Having to keep checking if the program is still running or have hanged and restarting it is not a way to develop software.

Software that have been in development for almost 45 years now like Maple, should have figured by now how to implement timelimit that works. 

Note that, with smaller timelimit it is possible it will  not hang, because longer time limit makes it end in the code path which causes the hang. When I tried 5 seconds for example instead of 30 second, it did not hang With 30 it does. so if you try it and it does not hang, please increase the timelimit a little and it will surely hang. Just make sure to do restart each time, since Maple remembers last result.

maple's server.exe was running at full cpu also.

 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1810 and is the same as the version installed in this computer, created 2024, September 18, 18:16 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

M:=-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)/(-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)*R+(-6*I*3^(1/6)-2*3^(2/3))*2^(1/3)+2^(2/3)*(I*3^(5/6)-3^(1/3))*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(2/3));
try #this hangs
    timelimit(40,int(M,R));
    print("finished with no timeout");
catch:
    print("waiting for timeout");
end try;

-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)/(-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)*R+(-(6*I)*3^(1/6)-2*3^(2/3))*2^(1/3)+2^(2/3)*(I*3^(5/6)-3^(1/3))*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(2/3))

 

 

Download int_hangs_with_timelimit.mw

 

I have an expression equal to the sum of N terms of the form Int(fn=1..N(x), x) and I want to replace each fn(x) by its Taylor (or series) expansion.

When the integrals are definite, like J1 below, I can easily obtain a new expression (K1) where the integrand has been replaced by some expansion.
But when the integral is indefinite, like J2, I get an evaluated expression for K2.

It seems I have to do some gymnastic (J3 --> K3) to get what I want

restart

J1 := Int(sin(p*x), x=0..1);
K1 := eval(J1, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x = 0 .. 1)

 

Int(p*x-(1/6)*p^3*x^3, x = 0 .. 1)

(1)

# undefined integration

J2 := Int(sin(p*x), x);

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x);

K2 := eval(J2, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x)

 

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x)

 

eval(Int(sin(p*x), x), {Int = (proc (a, b) options operator, arrow; Int(mtaylor(a, x = 0, 5), b) end proc)})

(2)

# undefined integration using Intat

J3 := Intat(op(1, J2), op(2, J2)=y);
eval(%, Intat = ((a, b) -> Intat(mtaylor(a, x=0, 5), b))):

K3 := IntegrationTools:-Change(convert(%, Int), y=x, x)

Intat(sin(p*x), x = y)

 

Int(p*x-(1/6)*p^3*x^3, x)

(3)
 

 

Download Integration.mw

Why do I get this unevaluatedform for K2?
Do I have to use Intat to get K3?

Thanks in advance

I want to make a list of ex, and in each of ex contains some item of enumerare. This is my code:

restart;
with(geometry);
mylist := [[-1, 9, -15], [1, -6, -15], [1, -6, 9], [1, 6, 12], [-2, 3, 12], [2, -9, 12], [-1, -6, -9], [-1, -9, -15], [1, 6, -15], [-2, 9, -12], [1, 3, 3], [-1, 6, -9], [3, -4, 2], [-5, 5, -2], [-3, -5, -4], [-2, 1, -3], [-5, -4, -2], [5, 5, 4], [-1, -2, -2], [-3, 1, -5]];
toX := s -> latex(s, output = string);
s := "";
for item in mylist do
    a := item[1];
    b := item[2];
    c := item[3];
    f := x -> a*x^3 + b*x^2 + c*x;
    sol := solve(diff(f(x), x) = 0, x);
    x1 := sol[1];
    x2 := sol[2];
    f2 := diff(f(x), x, x);
    if subs(x = x1, f2) < 0 then
        max_point := [x1, f(x1)];
    elif subs(x = x2, f2) < 0 then
        max_point := [x2, f(x2)];
    else
        max_point := "No maximum";
    end if;
    point(o, 0, 0);
    point(A, x1, f(x1));
    point(B, x2, f(x2));
    AB := simplify(distance(A, B));
    d := Equation(line(k, [A, B], [x, y]));
    lined := sort(sign(coeff(lhs(d), x))*d/igcd(coeff(lhs(d), x), coeff(lhs(d), y)));
    myr := distance(o, k);
    circle_eq := x^2 + y^2 = myr^2;
    s := cat(s, "\\begin{ex}\n", "  Given the function $y = ", toX(f(x)), "$.\n", "  \\begin{enumerate}[label=\\alph*)]\n", "    \\item The derivative of the function is $y'=", toX(diff(f(x), x)), "$.\n", "    \\item The maximum point of the function's graph is $P(", toX(max_point[1]), ", ", toX(max_point[2]), ")$.\n", "    \\item The equation of the line passing through the two extremum points of the graph is $", toX(lined), "$.\n", "    \\item The distance between the two extremum points $A$ and $B$ is $", toX(AB), "$.\n", "    \\item The equation of the circle with center at the origin and tangent to the line passing through the two extremum points is $", toX(circle_eq), "$.\n", "  \\end{enumerate}\n", "\\end{ex}\n\n");
end do;
printf("%s", s);


It seems there is a bug, I get a massage Error, (in geometry:-line) the line is not defined. 

How can I prepare it? and how can I reduce the code? 

Hi,

I recently moved from Windows 10 to Windows 11. I am using Maple 2022.2, and I got that installed and working OK. 

I have four Maple worksheets that I have saved as tasks on Windows 10, but my OS move requires some adjustments. When I try save the modified worksheets to the default Maple help database, I get an error saying that the database is read-only. When I try to make a new database file, Maple asks if it should create it, but then I get an error that Maple can't open the new database.

Suggestions?

Thanks,

Jno.

How do I do the following: 
Im having trouble plotting them on maple 2024 as well

For each function ( f(x) ) given below, define ( F(x) = \integral ,from a to x ,  f(t) \, dt \).

Is \( F(x) \) an antiderivative of \( f(x) \)? Plot \( f(x) \) and \( F(x) \) in the same window for \( x \in [a, b] \). How is \( F(x) \) related to the area between \( f(x) \) and the x-axis on \( [a, b] \)?

(a) ( f(x) = (1/x^2),  a = 1, , b = 10 )

(b) ( f(x) = sin x,  a = 0, , b = pi )

(c) ( f(x) = (1/4) x^4 - 2 x^3+ 4 x^2, , a = 0, , b = 5 )

(d) ( f(x) = (1/4) x^4 - 2 x^3 + 4 x^2, , a = 0, , b = 6 )

.

3 4 5 6 7 8 9 Last Page 5 of 2152