MaplePrimes Questions

Using the parametric representation of a circle in 2 dimensions:  c + r*cos(t)*v + r*sin(t)*u, t = 0..2*Pi,  where c is the center, r is the radius, v and u are orthogonal unit vectors, I want to animate the circle for r = r1..r2.

Example:

animate(plot, [c+r*cos(t)+r*sin(t),t=0..6.3],r=5..10);

I don't understand why this doesn't work!!  

Thank you

Hi

I am looking for a more efficient way to find all Divisors of n that are smaller than m as

Divisors(n) intersect {seq(i),i=1..m}

For example: For n=24 and m=7 it should result {1.2.3.4.6}.

Thanks for your help!

mm.mw    I want to obtain T_1*P_1*T_2*P_2*T_3*P_3. What should I do?

I want to test how well Maple's numeric solver respects a variety of conservation laws. To do so, I must numerically integrate a numerical derivative; however, every method I've tried using does not work. In essence, I need the following code to work.

restart;
with(PDEtools); with(plots); with(DEtools);
pde := diff(v(x, t), t, t) = diff(v(x, t), x, x);
f := xi -> exp(-xi^2);
a := -10; b := 10; dx := 1/50; t_final := 10;

pds := pdsolve(pde, {v(a, t) = 0, v(b, t) = 0, v(x, 0) = f(x + 5), D[2](v)(x, 0) = -eval(diff(f(x), x), x = x + 5)}, numeric, range = a .. b, time = t, spacestep = dx);

sol_proc := rhs(pds:-value(output = listprocedure)[3]);
sol := (x, t) -> piecewise(a < x and x < b, sol_proc(x, t), 0);
int(fdiff(sol(x, t), [t = 0]), a .. b);

Error, (in depends) too many levels of recursion

Verification_24_09_2024.mw

In the attached file, in the subsection named #Transmittance calculation I had an issue with the absolute value calculation. The calculation in the first part for the expression a1 was carried out although with addition of some strange t parameter in the exponent power. The second one just didn`t. I will be more than grateful for some help and advice. In addition, I have been struggling with that for a long time so if you have in mind some book or youtube lesson that clarifies all of that I will be more than happy. Nothing valuable was found on the web so far :(

The result of the function was computed successfully using the proc function, but how to plot the computed image? Using the seq command but the step size can not get the desired, using the for loop is too cumbersome, what should be done?fuxian.mwfuxian.mw

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

I was wondering if there is a way to measure/extract the contact forces that occur during a contact event? Preferably I would like to visualize the contact forces in the 3D result view.

I would also like to extract information about slippage in a contact.

Is this somehow possible?

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

First 67 68 69 70 71 72 73 Last Page 69 of 2426