Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Does Maple provide any command/examples that can help verfying whether an analytic function or a time series (a sequence of numbers) is periodic?

I had a look at signal processing. In principle auto-correlation could be used for that purpose but I am interested in a command that outputs a period for a given allowable error or a graphical display that can help in an assessment.

Analytic convolution and analysis of the convolution terms for periodic conditions would be great for analytic functions.

I have no time (and limited skills) to program such things myself.

Hello everyone, first time poster here.

I am trying to calculate xDLVO theory for a surface, which is simply 3 equations with 3 unknown. I have values for everything except x, y and z and Maple gives intermediate results for all the equations when defining them. The cos(x) is of a contact angle, and the problem is that Maple will not calculate x, y and z when all three cos(x) have decimal numbers. when changing just one of them to a whole number, such as changing cos(66.969) to cos(67), then it solve the unknowns. This is the same for the other two numbers, there just always have to be a atleast one whole number in one of the cos(x). I have tried to just use the results of the cos(x), so I enter decimal numbers instead of the entire (1+cos(x) bracket, and it still will not work with decimal numbers.

I am not the brightest at math or Maple, so maybe it is a dumb mistake from my part :)

 

eqw := Ytotw*(1 + cos(66.696)) = 2*(sqrt(Ylww*x) + sqrt(y*Ypw) + sqrt(Ymw*z));

           eqw := 17.99142992 = 2*sqrt(26)*sqrt(x) + 10.09950494*sqrt(y) + 10.09950494*sqrt(z)


eqf := Ytotf*(1 + cos(42.497)) = 2*(sqrt(Ylwf*x) + sqrt(y*Ypf) + sqrt(Ymf*z));

           eqf := 62.95291273 = 2*sqrt(39)*sqrt(x) + 3.019933774*sqrt(y) + 12.58570618*sqrt(z)


eqd := Ytotd*(1 + cos(30.405)) = 2*(sqrt(Ylwd*x) + sqrt(y*Ypd) + sqrt(Ymd*z));

          eqd := 77.77865435 = 14.25482374*sqrt(x)


solve([eqw, eqf, eqd], [x, y, z]);
                               []

 

Thank you for your time!

Best regards

Jakob

Hello, I need help to find the real and Imaginary components of following complex model using maple, here q=u+iv,

The maple worksheet shows an incorrect evaluation of the integral in (1) which is a standard integral representation of a Bessel function.  Equations (2)-(5) along with the graph show the incorrectness of the evaluation.  What is going on?

Bessel.mw

This worksheet defines two physics problems and fails in the attempt to solve the first one.

How can these problems be solved?

Rolling_circle.mw

Hello, can somebody give some suggestions to speed up this summations? I am summing up to 10 and it take ages (about 10min).

Digits := 10;
n1 := 122;
x := 54;
n2 := 65;
y := 14;
alpha1 := 1.1;
beta1 := 1.1;
alpha2 := 1.1;
beta2 := 1.1;

Sigma2 := (j, l, psi0) -> Sum(Sum(Sum(psi0^(-y - alpha2 - l - alpha2*h - v)*pochhammer(beta2 - 1, h)*pochhammer(beta1 - 1, u)*pochhammer(y + alpha2 + l + alpha2*h, v)*2^(-y - alpha2 - l - alpha2*h - x - alpha1 - j - alpha1*u - v)*(psi0 - 1)^v/(h!*(y + alpha2 + l + alpha2*h)*u!*v!*(y + alpha2 + l + alpha2*h + x + alpha1 + j + alpha1*u + v)), u = 0 .. upto), h = 0 .. upto), v = 0 .. upto);

F2 := psi0 -> Sum(binomial(n1 - x, j)*Sum(binomial(n2 - y, l)*(-1)^(j + l)*Sigma2(j, l, psi0), l = 0 .. n2 - y), j = 0 .. n1 - x);

upto:=10;

F2(5.620);

Thanks in advance.

Found this old procedure code and revived it
Trying to include an Exploreplot as well
a0,a1,a2,b1,b2 are coeifficents in a ode to construct 
How about odetype when constructing a ode is this correct in code?


 

restart;

Odegenerator := proc(V, x, y, df, const_values)
    local input_args, xi, F, result, a0, a1, a2, b0, b1, sol, Fsol, rows, numrows, eq, count, odeplot_cmd, ode_type, row_number, values;
    uses plots, PDEtools;
       if nargs = 1 and V = "help" then
        printf("Use this procedure as follows:\n");
        printf("Define an ODE template:\n");
        printf("Odegenerator(V, x, y, df, const_values)\n");
        printf("V: A set of values for iteration over constants (if df > 0)\n");
        printf("x: The independent variable\n");
        printf("y: The function\n");
        printf("df: The row number in the DataFrame or 0 for manual input\n");
        printf("const_values: A list of values for the constants (used if df = 0)\n");
        return;
    end if;

    if nargs < 4 or nargs > 5 then
        error "Incorrect number of arguments. Expected: V, x, y, df, [const_values (optional)]";
    end if;

    # Determine the ODE type using odeadvisor for the global eq_template
    ode_type := odeadvisor(eq_template);

    # Display the ODE and its type
    print(eq_template, ode_type);

    rows := [];
    count := 0;
    ###################### BOF manuele invoer ###################
    if df = 0 then
    # If df = 0, use const_values for substitution
    if nargs < 5 or not type(const_values, list) then
        error "When df = 0, a list of constant values must be provided as the fifth argument.";
    end if;

    # Assign constant values
    if nops(const_values) <> 5 then
        error "The list of constant values must contain exactly 5 elements.";
    end if;

    # Find the corresponding row number by unique identification
    count := 1;
    for a0 in V do
        for a1 in V do
            for a2 in V do
                for b0 in V do
                    for b1 in V do
                        if [a0, a1, a2, b0, b1] = const_values then
                            row_number := sprintf("%d", count);  # Convert to string
                        end if;
                        count := count + 1;
                    end do;
                end do;
            end do;
        end do;
    end do;

    if not assigned(row_number) then
        row_number := "Unique (outside iterative rows)";  # Mark as unique
    end if;

    # Substitute the given values
    eq := subs({'a__0' = const_values[1], 'a__1' = const_values[2], 'a__2' = const_values[3], 'b__0' = const_values[4], 'b__1' = const_values[5]}, eq_template);

    # Solve the equation
    sol := dsolve(eq, y(x));
    if type(sol, `=`) then
        Fsol := rhs(sol);
    else
        Fsol := "No explicit solution";
    end if;

    # Display the solution and its row number
    odeplot_cmd := DEtools[DEplot](eq, y(x), x = 0 .. 2, y = -10 .. 10, [[y(0) = 1]]);
    print(plots:-display(odeplot_cmd, size = [550, 550]));

    printf("The found function is:\n");
    print(Fsol);
    printf("The corresponding row number is: %s\n", row_number);

    # -- Start of Additional Functionality --
    # Optionally display the simplified ODE
    printf("The simplified ODE using the given coefficients is:\n");
    print(eq, ode_type);
    # -- End of Additional Functionality --

    return Fsol;
     ################# EOF manuele berekening ##################
     ############## BOF iterative berekening##############
    else
        # Iterative approach for DataFrame generation
        for a0 in V do
            for a1 in V do
                for a2 in V do
                    for b0 in V do
                        for b1 in V do
                            xi := x;
                            F := y;

                            # Substitute constant values into the ODE
                            eq := subs({'a__0' = a0, 'a__1' = a1, 'a__2' = a2, 'b__0' = b0, 'b__1' = b1}, eq_template);

                            sol := dsolve(eq, F(xi));
                            if type(sol, `=`) then
                                Fsol := rhs(sol);
                            else
                                Fsol := "No explicit solution";
                            end if;

                            rows := [op(rows), [a0, a1, a2, b0, b1, Fsol]];
                        end do;
                    end do;
                end do;
            end do;
        end do;

        numrows := nops(rows);
        result := DataFrame(Matrix(numrows, 6, rows), columns = ['a__0', 'a__1', 'a__2', 'b__0', 'b__1', y(x)]);

        interface(rtablesize = numrows + 10);

        if df > 0 and df <= numrows then
            a0 := result[df, 'a__0'];
            a1 := result[df, 'a__1'];
            a2 := result[df, 'a__2'];
            b0 := result[df, 'b__0'];
            b1 := result[df, 'b__1'];

            eq := subs({'a__0' = a0, 'a__1' = a1, 'a__2' = a2, 'b__0' = b0, 'b__1' = b1}, eq_template);

            # Display the additional parameters
            print(eq, ode_type, [df], [a0, a1, a2, b0, b1]);

            # Retrieve the solution
            Fsol := result[df, y(x)];

            # Display the solution in DEplot
            odeplot_cmd := DEtools[DEplot](eq, y(x), x = 0 .. 2, y = -10 .. 10, [[y(0) = 1]]);
            print(plots:-display(odeplot_cmd, size = [550, 550]));

            printf("The found function for row number %d is:\n", df);
            print(Fsol);

        else
            printf("The specified row (%d) is out of bounds for the DataFrame.\n", df);
        end if;

        return result;
     ########## EOF iteratief bwrekening ########################
    end if;

end proc:


# Test cases
V := {0, 1};
eq_template := diff(y(t), t) = 'a__0'*sin(t) + 'a__1'*y(t) + 'a__2'*y(t)^2 + 'b__0'*exp(-t);



 

{0, 1}

 

diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t)

(1)

 

 

# Iterative test
result := Odegenerator(V, t, y, 25);

diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t), odeadvisor(diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t))

 

diff(y(t), t) = sin(t)+y(t), odeadvisor(diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t)), [25], [1, 1, 0, 0, 0]

 

 

The found function for row number 25 is:

 

-(1/2)*cos(t)-(1/2)*sin(t)+c__1*exp(t)

 

module DataFrame () description "two-dimensional rich data container"; local columns, rows, data, binder; option object(BaseDataObject); end module

(2)

 

# Manual input test
Odegenerator(V, t, y, 0, [1, 1, 0, 0, 0]); #0 after y is rownumber = 0 and [1, 1, 0, 0, 0] are coeifficents

diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t), odeadvisor(diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t))

 

 

The found function is:

 

-(1/2)*cos(t)-(1/2)*sin(t)+c__1*exp(t)

 

The corresponding row number is: 25
The simplified ODE using the given coefficients is:

 

diff(y(t), t) = sin(t)+y(t), odeadvisor(diff(y(t), t) = a__0*sin(t)+a__1*y(t)+a__2*y(t)^2+b__0*exp(-t))

 

-(1/2)*cos(t)-(1/2)*sin(t)+c__1*exp(t)

(3)
 

 

 


Download ODEGENERATORFUNCTIE_opgepakt-uitgebreid_naar_MprimesDEF_14-1-2025.mw

How do I generate a plot within a plot as shown in my example below? The fundemental issue is plot structures like Histogram() etc are not images and so combining them in the way I imagine is non-trivial. I couldn't find a standard way to do this in the help section.

Plot_within_a_plot.mw

restart

NULL``

with(plots)

NULL

Consider the two plots p1 and p2.

NULL

p1 := plot(sin(x), size = [300, 300])

 

p2 := plot(sin(x), view = [0 .. Pi, .5 .. 1], size = [300, 300], axes = boxed)

 

NULL

How do I generate a plot within a plot as shown below, if I calculated the plots ahead of time? Is there a standard way to do this?

NULL

NULL

NULL

Download Plot_within_a_plot.mw

Is there an easy way to get the midpoint and distance in maple?

Thanks in advance.

Distance and Midpoint

 

 

Table 1: Key Skills

NULLdmf1 := [-3, 1]

[-3, 1]

(1)

dmf2 := [3, 2]

[3, 2]

(2)

dmf3 := [-2, -3]

[-2, -3]

(3)

dmf4 := [3, -2]

[3, -2]

(4)

dmf := [dmf1, dmf2, dmf3, dmf4]

[[-3, 1], [3, 2], [-2, -3], [3, -2]]

(5)

plot(dmf)

 

NULL

dme1a1 := [1, 3]

[1, 3]``

(6)

dme1a2 := [5, 6]

[5, 6]

(7)

dme1a3 := [5, 3]

[5, 3]

(8)

dme1 := [dme1a1, dme1a2, dme1a3]

[[1, 3], [5, 6], [5, 3]]

(9)

plot(dme1)

 

NULL

``

NULL

NULL

NULL

NULL

NULL

NULL

NULL

Download 2.1-Distance_and_Midpoint.mw

Hello everyone, I am facing problem to solve a system of partial differential equations of f, g & q in three variables x,y,t. I have attached the maple file and also a page that i am exploring, in attcahed page I need to find results given in (7) and (8). Maple file is also attached below, please help me to solve this system of PDEs for required results given in (7) and (8). Thanks
 


 

Download PDEs_system_solution.mw

restart

with(PDEtools):

alias(u = u(x, y, t), f = f(x, y, t), g = g(x, y, t), q = q(x, y, t))

u, f, g, q

(1)

eq1 := 24*g*(diff(q, y))*(diff(q, x))^3-12*(diff(q, y))*(diff(q, x))^2*g^2 = 0

24*g*(diff(q, y))*(diff(q, x))^3-12*(diff(q, y))*(diff(q, x))^2*g^2 = 0

(2)

eq2 := 60*g*sigma*(diff(q, y))*(diff(q, x))^3-30*sigma*(diff(q, y))*(diff(q, x))^2*g^2+18*(diff(g, x))*(diff(q, y))*(diff(q, x))^2-15*(diff(q, y))*(diff(q, x))*(diff(g, x))*g+18*g*(diff(q, y))*(diff(q, x))*(diff(q, x, x))-3*(diff(q, y))*g^2*(diff(q, x, x))+6*(diff(g, y))*(diff(q, x))^3+18*g*(diff(q, x))^2*(diff(q, y, x))-9*(diff(g, y))*g*(diff(q, x))^2-3*g^2*(diff(q, x))*(diff(q, y, x)) = 0

60*g*sigma*(diff(q, y))*(diff(q, x))^3-30*sigma*(diff(q, y))*(diff(q, x))^2*g^2+18*(diff(g, x))*(diff(q, y))*(diff(q, x))^2-15*(diff(q, y))*(diff(q, x))*(diff(g, x))*g+18*g*(diff(q, y))*(diff(q, x))*(diff(diff(q, x), x))-3*(diff(q, y))*g^2*(diff(diff(q, x), x))+6*(diff(g, y))*(diff(q, x))^3+18*g*(diff(q, x))^2*(diff(diff(q, x), y))-9*(diff(g, y))*g*(diff(q, x))^2-3*g^2*(diff(q, x))*(diff(diff(q, x), y)) = 0

(3)

eq3 := 36*g*sigma*(diff(q, y))*(diff(q, x))*(diff(q, x, x))-27*sigma*(diff(q, y))*(diff(q, x))*(diff(g, x))*g-3*(diff(q, y))*(diff(g, x))^2+6*(diff(g, y, x))*(diff(q, x))^2-9*(diff(g, y))*(diff(g, x))*(diff(q, x))+2*g*(diff(q, y))*(diff(q, t))+2*g*(diff(q, y))*(diff(q, x, x, x))-6*(diff(f, y))*(diff(q, x))^2*g+12*(diff(g, y))*sigma*(diff(q, x))^3+6*(diff(g, x))*(diff(q, y))*(diff(q, x, x))-3*(diff(q, y, x))*(diff(g, x))*g-3*(diff(q, y))*(diff(g, x, x))*g+6*(diff(q, y))*(diff(g, x, x))*(diff(q, x))-3*(diff(q, x, x))*(diff(g, y))*g-3*g*(diff(q, x))*(diff(g, y, x))+12*(diff(q, x))*(diff(g, x))*(diff(q, y, x))+6*g*(diff(q, y, x))*(diff(q, x, x))+6*(diff(q, x))*g*(diff(q, y, x, x))+6*(diff(g, y))*(diff(q, x))*(diff(q, x, x))-6*sigma*(diff(q, x))*(diff(q, y, x))*g^2+50*g*sigma^2*(diff(q, y))*(diff(q, x))^3-24*sigma^2*(diff(q, y))*(diff(q, x))^2*g^2+36*(diff(g, x))*sigma*(diff(q, y))*(diff(q, x))^2-15*(diff(q, x))^2*sigma*(diff(g, y))*g-6*(diff(f, x))*(diff(q, y))*(diff(q, x))*g-6*sigma*(diff(q, y))*(diff(q, x, x))*g^2+36*g*sigma*(diff(q, x))^2*(diff(q, y, x)) = 0

50*g*sigma^2*(diff(q, y))*(diff(q, x))^3-24*sigma^2*(diff(q, y))*(diff(q, x))^2*g^2+36*(diff(g, x))*sigma*(diff(q, y))*(diff(q, x))^2-15*(diff(q, x))^2*sigma*(diff(g, y))*g-6*(diff(f, x))*(diff(q, y))*(diff(q, x))*g-6*sigma*(diff(q, x))*(diff(diff(q, x), y))*g^2-6*sigma*(diff(q, y))*(diff(diff(q, x), x))*g^2+36*g*sigma*(diff(q, x))^2*(diff(diff(q, x), y))-3*(diff(q, y))*(diff(g, x))^2+6*(diff(diff(g, x), y))*(diff(q, x))^2+6*(diff(g, y))*(diff(q, x))*(diff(diff(q, x), x))+6*(diff(g, x))*(diff(q, y))*(diff(diff(q, x), x))-3*(diff(diff(q, x), y))*(diff(g, x))*g-3*(diff(q, y))*(diff(diff(g, x), x))*g+6*(diff(q, y))*(diff(diff(g, x), x))*(diff(q, x))-3*(diff(diff(q, x), x))*(diff(g, y))*g-3*g*(diff(q, x))*(diff(diff(g, x), y))+12*(diff(q, x))*(diff(g, x))*(diff(diff(q, x), y))+6*g*(diff(diff(q, x), y))*(diff(diff(q, x), x))+6*(diff(q, x))*g*(diff(diff(diff(q, x), x), y))+2*g*(diff(q, y))*(diff(diff(diff(q, x), x), x))+2*g*(diff(q, y))*(diff(q, t))+12*(diff(g, y))*sigma*(diff(q, x))^3-9*(diff(g, y))*(diff(g, x))*(diff(q, x))-6*(diff(f, y))*(diff(q, x))^2*g-27*sigma*(diff(q, y))*(diff(q, x))*(diff(g, x))*g+36*g*sigma*(diff(q, y))*(diff(q, x))*(diff(diff(q, x), x)) = 0

(4)

eq4 := -3*g*(diff(f, y))*(diff(q, x, x))-3*(diff(q, y))*g*(diff(f, x, x))-3*g*(diff(q, x))*(diff(f, y, x))-3*g*(diff(q, y, x))*(diff(f, x))+15*g*sigma^3*(diff(q, y))*(diff(q, x))^3-6*sigma^3*(diff(q, y))*(diff(q, x))^2*g^2+21*(diff(g, x))*sigma^2*(diff(q, y))*(diff(q, x))^2-6*(diff(q, x))^2*sigma^2*(diff(g, y))*g-9*(diff(f, y))*(diff(q, x))^2*sigma*g+3*g*sigma*(diff(q, y))*(diff(q, t))-9*sigma*(diff(q, x))*(diff(g, x))*(diff(g, y))+9*(diff(g, y, x))*sigma*(diff(q, x))^2+7*(diff(g, y))*sigma^2*(diff(q, x))^3-3*sigma*(diff(q, y))*(diff(g, x))^2-6*(diff(g, x))*(diff(q, x))*(diff(f, y))-3*(diff(q, y))*(diff(g, x))*(diff(f, x))-3*(diff(g, y))*(diff(q, x))*(diff(f, x))-3*(diff(g, y, x))*(diff(g, x))-3*(diff(g, x, x))*(diff(g, y))+g*(diff(q, y, t))+9*g*sigma*(diff(q, y, x))*(diff(q, x, x))-3*sigma*(diff(q, x, x))*(diff(g, y))*g+9*sigma*(diff(q, x))*g*(diff(q, y, x, x))-3*sigma*(diff(q, y, x))*(diff(g, x))*g-3*sigma*(diff(q, x))*(diff(g, y, x))*g+9*(diff(g, y))*sigma*(diff(q, x))*(diff(q, x, x))+9*(diff(g, x))*sigma*(diff(q, y))*(diff(q, x, x))+3*g*sigma*(diff(q, y))*(diff(q, x, x, x))+18*sigma*(diff(q, x))*(diff(g, x))*(diff(q, y, x))+21*g*sigma^2*(diff(q, x))^2*(diff(q, y, x))-3*sigma^2*(diff(q, x))*(diff(q, y, x))*g^2+9*sigma*(diff(q, y))*(diff(g, x, x))*(diff(q, x))-3*sigma*(diff(q, y))*(diff(g, x, x))*g-3*sigma^2*(diff(q, y))*(diff(q, x, x))*g^2+21*g*sigma^2*(diff(q, y))*(diff(q, x))*(diff(q, x, x))-9*(diff(f, x))*(diff(q, y))*(diff(q, x))*sigma*g-12*sigma^2*(diff(q, y))*(diff(q, x))*(diff(g, x))*g+(diff(q, y))*(diff(g, t))+(diff(g, y))*(diff(q, t))+3*(diff(g, x, x))*(diff(q, y, x))+(diff(q, y))*(diff(g, x, x, x))+3*(diff(q, x))*(diff(g, y, x, x))+(diff(q, y, x, x, x))*g+3*(diff(g, x))*(diff(q, y, x, x))+(diff(g, y))*(diff(q, x, x, x))+3*(diff(g, y, x))*(diff(q, x, x)) = 0

7*(diff(g, y))*sigma^2*(diff(q, x))^3-3*sigma*(diff(q, y))*(diff(g, x))^2-6*(diff(g, x))*(diff(q, x))*(diff(f, y))-3*(diff(q, y))*(diff(g, x))*(diff(f, x))-3*(diff(g, y))*(diff(q, x))*(diff(f, x))-3*(diff(q, y))*g*(diff(diff(f, x), x))-3*g*(diff(q, x))*(diff(diff(f, x), y))-3*g*(diff(f, y))*(diff(diff(q, x), x))-3*g*(diff(diff(q, x), y))*(diff(f, x))+9*(diff(diff(g, x), y))*sigma*(diff(q, x))^2+15*g*sigma^3*(diff(q, y))*(diff(q, x))^3-6*sigma^3*(diff(q, y))*(diff(q, x))^2*g^2+21*(diff(g, x))*sigma^2*(diff(q, y))*(diff(q, x))^2-6*(diff(q, x))^2*sigma^2*(diff(g, y))*g-9*(diff(f, y))*(diff(q, x))^2*sigma*g+3*g*sigma*(diff(q, y))*(diff(q, t))-9*sigma*(diff(q, x))*(diff(g, x))*(diff(g, y))+9*g*sigma*(diff(diff(q, x), y))*(diff(diff(q, x), x))-3*sigma*(diff(diff(q, x), x))*(diff(g, y))*g+9*sigma*(diff(q, x))*g*(diff(diff(diff(q, x), x), y))-3*sigma*(diff(diff(q, x), y))*(diff(g, x))*g-3*sigma*(diff(q, x))*(diff(diff(g, x), y))*g+9*(diff(g, y))*sigma*(diff(q, x))*(diff(diff(q, x), x))+9*(diff(g, x))*sigma*(diff(q, y))*(diff(diff(q, x), x))+3*g*sigma*(diff(q, y))*(diff(diff(diff(q, x), x), x))+18*sigma*(diff(q, x))*(diff(g, x))*(diff(diff(q, x), y))+21*g*sigma^2*(diff(q, x))^2*(diff(diff(q, x), y))-3*sigma^2*(diff(q, x))*(diff(diff(q, x), y))*g^2+9*sigma*(diff(q, y))*(diff(diff(g, x), x))*(diff(q, x))-3*sigma*(diff(q, y))*(diff(diff(g, x), x))*g-3*sigma^2*(diff(q, y))*(diff(diff(q, x), x))*g^2-9*(diff(f, x))*(diff(q, y))*(diff(q, x))*sigma*g-12*sigma^2*(diff(q, y))*(diff(q, x))*(diff(g, x))*g+21*g*sigma^2*(diff(q, y))*(diff(q, x))*(diff(diff(q, x), x))+(diff(q, y))*(diff(g, t))+(diff(g, y))*(diff(q, t))-3*(diff(diff(g, x), y))*(diff(g, x))-3*(diff(diff(g, x), x))*(diff(g, y))+g*(diff(diff(q, t), y))+3*(diff(diff(g, x), x))*(diff(diff(q, x), y))+(diff(q, y))*(diff(diff(diff(g, x), x), x))+3*(diff(q, x))*(diff(diff(diff(g, x), x), y))+(diff(diff(diff(diff(q, x), x), x), y))*g+3*(diff(g, x))*(diff(diff(diff(q, x), x), y))+(diff(g, y))*(diff(diff(diff(q, x), x), x))+3*(diff(diff(g, x), y))*(diff(diff(q, x), x)) = 0

(5)

eq5 := (diff(g, y))*sigma*(diff(q, t))+(diff(g, t))*sigma*(diff(q, y))+(diff(g, y))*sigma^3*(diff(q, x))^3+3*(diff(g, x))*sigma^3*(diff(q, y))*(diff(q, x))^2+g*sigma^2*(diff(q, y))*(diff(q, t))+g*sigma^4*(diff(q, y))*(diff(q, x))^3-3*(diff(f, x))*sigma*(diff(q, y))*(diff(g, x))-3*(diff(f, x))*sigma*(diff(q, x))*(diff(g, y))-6*(diff(f, y))*sigma*(diff(q, x))*(diff(g, x))+3*g*sigma^3*(diff(q, x))^2*(diff(q, y, x))+g*sigma^2*(diff(q, y))*(diff(q, x, x, x))-3*(diff(f, x))*sigma*(diff(q, y, x))*g-3*(diff(f, y))*sigma*(diff(q, x, x))*g-3*g*sigma*(diff(q, y))*(diff(f, x, x))-3*sigma*(diff(q, x))*g*(diff(f, y, x))+3*(diff(g, x, x))*sigma^2*(diff(q, y))*(diff(q, x))+6*(diff(g, x))*sigma^2*(diff(q, x))*(diff(q, y, x))+diff(g, y, t)-3*(diff(f, x))*(diff(q, y))*(diff(q, x))*sigma^2*g+3*g*sigma^3*(diff(q, y))*(diff(q, x))*(diff(q, x, x))+3*g*sigma^2*(diff(q, x))*(diff(q, y, x, x))-3*(diff(f, y))*(diff(q, x))^2*sigma^2*g+3*(diff(g, y))*sigma^2*(diff(q, x))*(diff(q, x, x))+3*g*sigma^2*(diff(q, y, x))*(diff(q, x, x))+3*(diff(g, x))*sigma^2*(diff(q, y))*(diff(q, x, x))-3*(diff(g, y))*(diff(f, x, x))-3*(diff(f, y))*(diff(g, x, x))-3*(diff(g, x))*(diff(f, y, x))-3*(diff(f, x))*(diff(g, y, x))+diff(g, y, x, x, x)+3*(diff(g, y, x))*sigma^2*(diff(q, x))^2+3*(diff(g, x, x))*sigma*(diff(q, y, x))+3*(diff(g, y, x, x))*sigma*(diff(q, x))+(diff(g, x, x, x))*sigma*(diff(q, y))+g*sigma*(diff(q, y, t))+3*(diff(g, x))*sigma*(diff(q, y, x, x))+3*(diff(g, y, x))*sigma*(diff(q, x, x))+g*sigma*(diff(q, y, x, x, x))+(diff(g, y))*sigma*(diff(q, x, x, x)) = 0

(diff(g, t))*sigma*(diff(q, y))+(diff(g, y))*sigma^3*(diff(q, x))^3+(diff(g, y))*sigma*(diff(q, t))+3*(diff(diff(g, x), y))*sigma^2*(diff(q, x))^2+3*(diff(diff(g, x), x))*sigma*(diff(diff(q, x), y))+3*(diff(diff(diff(g, x), x), y))*sigma*(diff(q, x))+(diff(diff(diff(g, x), x), x))*sigma*(diff(q, y))+g*sigma*(diff(diff(q, t), y))+3*(diff(g, x))*sigma*(diff(diff(diff(q, x), x), y))+3*(diff(diff(g, x), y))*sigma*(diff(diff(q, x), x))+g*sigma*(diff(diff(diff(diff(q, x), x), x), y))+(diff(g, y))*sigma*(diff(diff(diff(q, x), x), x))-3*(diff(f, x))*(diff(q, y))*(diff(q, x))*sigma^2*g+3*g*sigma^3*(diff(q, y))*(diff(q, x))*(diff(diff(q, x), x))-3*(diff(f, y))*(diff(q, x))^2*sigma^2*g+6*(diff(g, x))*sigma^2*(diff(q, x))*(diff(diff(q, x), y))+3*g*sigma^2*(diff(q, x))*(diff(diff(diff(q, x), x), y))+3*(diff(g, y))*sigma^2*(diff(q, x))*(diff(diff(q, x), x))+3*g*sigma^2*(diff(diff(q, x), y))*(diff(diff(q, x), x))+3*(diff(g, x))*sigma^2*(diff(q, y))*(diff(diff(q, x), x))+3*g*sigma^3*(diff(q, x))^2*(diff(diff(q, x), y))+g*sigma^2*(diff(q, y))*(diff(diff(diff(q, x), x), x))-3*(diff(f, x))*sigma*(diff(diff(q, x), y))*g-3*(diff(f, y))*sigma*(diff(diff(q, x), x))*g-3*g*sigma*(diff(q, y))*(diff(diff(f, x), x))-3*sigma*(diff(q, x))*g*(diff(diff(f, x), y))+3*(diff(diff(g, x), x))*sigma^2*(diff(q, y))*(diff(q, x))+3*(diff(g, x))*sigma^3*(diff(q, y))*(diff(q, x))^2+g*sigma^2*(diff(q, y))*(diff(q, t))+g*sigma^4*(diff(q, y))*(diff(q, x))^3-3*(diff(f, x))*sigma*(diff(q, y))*(diff(g, x))-3*(diff(f, x))*sigma*(diff(q, x))*(diff(g, y))-6*(diff(f, y))*sigma*(diff(q, x))*(diff(g, x))+diff(diff(g, t), y)+diff(diff(diff(diff(g, x), x), x), y)-3*(diff(g, y))*(diff(diff(f, x), x))-3*(diff(f, y))*(diff(diff(g, x), x))-3*(diff(g, x))*(diff(diff(f, x), y))-3*(diff(f, x))*(diff(diff(g, x), y)) = 0

(6)

eq6 := -3*(diff(f, x))*(diff(f, y, x))-3*(diff(f, y))*(diff(f, x, x))+diff(f, y, x, x, x)+diff(f, y, t) = 0

-3*(diff(f, x))*(diff(diff(f, x), y))-3*(diff(f, y))*(diff(diff(f, x), x))+diff(diff(diff(diff(f, x), x), x), y)+diff(diff(f, t), y) = 0

(7)

pdsolve({eq1, eq2, eq3, eq4, eq5, eq6}, {f, g, q})

``

Download PDEs_system_solution.mw

Can maple simplify a Combined Inequality? At best it outputs imho a more complicated solution.

Thanks in Advance.

sl10 := -1 <= (3-5*x)*(1/2) and (3-5*x)*(1/2) <= 9

0 <= 5/2-(5/2)*x and -(5/2)*x <= 15/2

(1)

The output should be:

 

-3 <= x and x <= 1


Download Combined_Inequality.mw

This is a very serious problem. Maple 2024.2 on windows 10.

I noticed, may be starting 2-3 weeks now, that sometimes when I do File->Open , and the Open dialogue opens, I am not able to use the mouse to select the .mw file I want to open. 

Can not even close the dialogue by clicking X. Even clickiing on cancel does nothing.  Basically the mouse seems not doing anything.

Only way is to type using the keyboard the file name. Eveything else does not work.

Not only that, the mouse is trapped in the dialogue.

I can't even get it out of Maple to go to another application. AT first, I had to do CTRL-ALT-DEL to get out and use the task manager to kill Maple. Then later I found if I type the file name I can get out.

Here is a movie.  

I do not understand what is causing this. This only happens in Maple for me. Neven seen anything like this before.

Any suggestions what to look for?

I just remembered. 2-3 weeks ago, I closed the left panel. As you see above.

I just tried now, and expanded it again, and guess what, the mouse seems to be working now!

Can someone conform this?  Here is a movie with the panel expanded again:

You see, the mouse now works and can select files.

When I minimize the left panel, the mouse sometimes stops working in file dialogue.

Here is another movie showing this problem much more clearly.

When closing the left panel, the open file dialogue stops working (mouse not working), and when expanding it again, it starts to work!

This can not be a feature right? it must be a bug in the Java interface?

Keywords: Intermediate axis theorem, Tennis racket theorem, Dzhanibekov effect, Coriolis force, Euler equations

In 1988 I witnesses the instability of the rotation about the intermediate axis of a foam brick.

Since then I have been fascinated by this effect. It was one of the many experiments which enriched a lecture series on kinetics and on that day Euler equations were on the agenda. Colored surfaces of the brick made it possible to observe the effect without micro gravity and slow-motion equipment.

This post is about reproducing an “intuitive” visualization of an explanation of the effect by Terry Tao from 2011 using 4 rigidly connected point masses. 8 years later the explanation was animated in a YouTube video (The Bizarre Behavior of Rotating Bodies) and considered to be the “best intuitive” explanation.

Motivated by the video, I wondered whether a similar animation with acting forces is possible with MapleSoft products and whether there might be a better intuitive explanation without the use of centrifugal forces. Initially I saw this more as a good test of MapleSim’s visualization capabilities. Finally, it took over 3 years and numerous attempts (mostly during vacation, kind of a substitute for drawing circles in the sand...) to come to a conclusion on the effect.

Intermediate_axis_theoreme_with_3_point_masses.msim


About the model:

Unlike the YouTube video, I decided to simulate 3 identical point masses because a 3-mass model fits better to a T-handle (overlayed in the animation above), video footage from space experiments and discussions in this forum (221298, 225760, 228066).

The movement of the model generates acceleration forces on each mass. The clip displays the corresponding opposing forces that act in the model (i.e. act on the massless T-structure). The blue mass, which is not perfectly centered on the axis of rotation at the start of the simulation perturbs the orbits of the red and the green masses. That was my initial intuitive attempt to explain the effect.

The 3 masses form an isosceles triangle. Here it is helpful to think of a rotating arrowhead where the shape determines stability of the rotation. The aspect ratio (the ratio of the height to the base length) of the triangle determines the stability of rotation about the mirror symmetry axis of the triangle (i.e. the symmetry axis of the T-structure). An obtuse triangle (“blunt”, aspect ratio < sqrt(3)/2) is unstable when rotating about an axis that is slightly inclined with respect to this axis of symmetry. The inclination can be in the plane of the triangle or out of plane. An acute (“pointy”) triangle only wobbles.

About the MapleSim model:

A supplementary rigid body component without mass and rotational inertia is used at the center of mass of the three masses to impose initial conditions. Rotating the triangle at the start of the simulation about the center of mass of the 3 masses prevents the triangle from drifting laterally away from its initial position. This effect of lateral drift is visible in video footage from space with the T-handle.

The rotational inertia of the other rigid body components is set to zero. Without rotational inertia it could be assumed that only Newtonian mechanics are used in the simulation (i.e. no Euler equations are integrated). This is however wrong. MapleSim generates automatically from a system with 3x6=18 coordinates a system with 3 Newtonian equations for translation and 3 Euler equations for rotation.

Forces and moments are measured with sensor components. Visualization is done with force and moment visualization components. These components are “abused” to display the following other physical quantities:

The angular momentum of the masses

The vectors of the angular velocity and the angular acceleration

Moments of the forces with respect to the center of mass

Moments of the forces with respect to the center of the base of the triangle

For a clean model, sensor components and mathematical components to calculate physical quantities are grouped in three subsystems (one per mass, indicated with a colored dot in the image below).

The model contains parameter sets for in plane and out of plane inclination of the axis of the T with respect to the initial axis of rotation (the x-axis).

Ein Bild, das Diagramm, Text, Screenshot, Plan enthält.

Automatisch generierte Beschreibung 

Visualization of physical components can be turned on by enabling the corresponding subsystems which are labeled accordingly (in the image above the display of the angular momentum is enabled). The subsystem “Verification” computes quantities that should either be conserved or should be equal to zero.  Calculation of quantities is done with MapleSim’s mathematical components (i.e. no embedded code or custom components are used).

 

Some observations

Kinetic energies are exchanged between the masses.  During a flip of the T (see animation above), the red and green masses “exchange” their energy. The blue mass mediates this exchange.  Depending on the initial conditions (in plane or out of plane), the energy of the red mass decreases first during the flip and the energy of the green mass increases (and vice versa, as seen below for the out of plane case which exhibits symmetric energy distributions).

Energy peaks are a good measure for the flip frequency. The frequency increases with the initial misalignment of the rotation axis to the symmetry axis of the T.

Ein Bild, das Text, Reihe, Diagramm, parallel enthält.

Automatisch generierte Beschreibung 

Tracing the blue perturbing mass reveals that the mass never gets closer to the (initial) rotation axis than its initial off-axis position.

Ein Bild, das Zeichnung, Kreis, Entwurf, Kunst enthält.

Automatisch generierte Beschreibung

The angular momenta of the masses vary, but the total angular momentum is, as expected, conserved. In the image below the angular momenta of the three masses are visualized to the left. The change of kinetic energy can be appreciated from the change in magnitude of the angular momenta.

The vector of the angular velocity (violet, at the origin) wobbles during the flip but does not flip direction. The vector of the angular acceleration (orange) rotates in the yz-plane

Forces act in the plane of the triangle. There is no component normal to the plane, as in the YouTube video, that could cause a flip. Thus, the displayed forces measured in the inertial reference frame do not provide an intuitive explanation why the flip occurs.

The same applies for the moments of the forces at the center of mass: They are perfectly balanced. There is no net component that could be attributed to an in-plane rotation.

 

Why are the animations different: Apparent vs. internal reactive forces.

The MapleSim animation shows internal reactive forces that illustrate the interplay of the moving masses which are bound to each other. They act in the model and obey actio = reactio, which means that the same vectors of opposite sign pull on the masses when the masses are isolated (they follow Newtons second law and equate to mass times the vector of acceleration; the last image in this post displays an isolated mass and the opposing force). 

On the contrary, the YouTube animation shows apparent forces (centrifugal forces) that appear when accelerations are described in a reference frame that moves (accelerates or rotates) with respect to the inertial reference frame. They look like external forces acting on the model, but they are not real. Since apparent forces are fictitious (not real), not everyone is satisfied with using them for an intuitive explanation.

 

Can the MapleSim animation be improved?

Calculation of apparent forces is possible but less straight forward for the simple reason that the Mathematical components library does not provide operators for coordinate transform and matrix multiplication. Those operators are normally not required for simulation purposes. (It would be interesting to see how calcualtion of apparent forces can be done in MapleSim. Verification of code implementation might not be as easy as in the inertial reference frame.)

What ultimately prevents a reproduction of the video is the observer/camera view that rotates with the model. This feature does not exist in the current version of MapleSim 2024. To reproduce the video, Maple has to be used. This would also make the implementation of the calculation of apparent forces much easier as compared to, for example, Modelica code implementation (at least for me).

 

Is the 3-mass model equally intuitive as a 4-mass model?

The initial idea was to have two orbiting masses that are perturbed by a third mass. The third mass flips like a pointer back and forth while the two masses still follow their orbit. This is in case of 3 identical masses only possible with a short-legged T as shown here:

Only a reduced mass would allow for a longer leg. Since the T has only one axis of symmetry, the two orbiting masses do not orbit in a plane. They perform a wobbling motion and shift laterally in position during a flip since the rotation is performed about the common center of mass. Only when 4 masses are used in a symmetrical cross configuration, two masses can orbit closer to a plane that contains the common center of mass while the two perturbing masses flip sides of the plane (the wobble is less pronounced but still visible by the enlarging blue trace in the animation below).

With a mass ratio of 1:100 in the animation below the two orbiting masses create kind of a centrifugal potential field in which the two perturbing masses swing like a pendulum. In this configuration the two perturbing masses can no longer be regarded as strongly disturbing, but rather as oscillating satellites. The sudden flip is created by the increasing accelerating field strength which increases with the distance from the axis of rotation. This lets a pendulum swing with a stronger than expected acceleration and is perhaps a new insight.

Both models represent the simplest possible implementation to generate the effect in terms of number of parameters. The 4-mass configuration has more objects but is simpler to understand because of the higher degree of symmetry.  Either identical masses at varying distances or identical distances at varying masses can be used in both models. No more reduction of parameters is possible to generate the effect. A two mass object cannot even wobble.

Out of plane initial inclination makes the acceptance of an explanation easier since the orbiting masses do not generate a momentum as in the case of an in plane inclination. For the latter case an intuitve explanation is more difficult and perhaps there is none.

Although the pendulum swing of the out of plane case might provide an intuitive explanation of the effect it is not fully satisfying. It does not explain why larger masses than the orbiting masses do not lead to a swing but smaller masses do. Another well-made video provides an explanation for that.

This newer video also gives an explanation why internal forces must act in the plane of the rotating object but does not display them in the animation. I guess this is because the introduction of real forces would have spoiled the intuitive explanation of the video. Isolating a mass and adding an internal force now as an external force leads to an equivalent system that reproduces the effect of the rotating object. If the same force is applied in the opposite direction on the isolated mass, the isolated mass moves along the same trajectory.

4_lumped_masses_and_one_single_force_driven_mass.msim

Isolating only one mass breakes the symmetry of the model. It also gives the false impression that the introduced perturbing force acts primarily on the opposite mass. A 3-mass model does not lead to such a false interpretation. By isolating the opposite mass and introducing a second perturbing force, the discussion shifts more to the analysis of the wobble and the rotational acceleration of the orbiting masses and less to the flip.

In summary, internal forces describe how the masses interact but their orientation is counterintuitively perpendicular to direction of the flip. On the other hand, centrifugal forces that we intuitively assume acting in a 4-mass model from the perspective of an observer from an inertial reference frame do not exist. This assumption provides an intuitive explanation which is physically wrong. In the same way an accelerating radial force field does not exist. Mathematically and physically correct is a description from a rotating observer which uses fictious forces.

For me both intuitive explanations of the videos are somehow useable, but both involve centrifugal forces (in one case explicitly and in the other wrongly assumed by an observer). This is not satisfying when the goal is not to use fictious forces.

Conclusion

MapleSim visualization components can be used for more than displaying forces and moments. They are very helpful to better understand physical phenomena.

A camera view observer on a rotating reference frame would have made observation of the direction of the internal forces much easier and might have given more insights. As of now, Maple is required to reproduce the animation in the video.

There is no better intuitive visualization/explanation with a model of 3 identical masses. A 4-mass configuration provides better insight but does not explain all.

In reality every freely rotating object with more than two point masses inevitably wobbles.

Here's a puzzle for geometry lovers. It has a very short manual solution, but it's not that easy to find. Of course, you can solve it in Maple using coordinates. You need to find the radius of these two identical circles.

I am using the tab key to complete commands. Often I have to add a module to the command. On my keyboard typing ":-" is slow (for me) and interrupts the flow. I was wondering whether there is not a undocumented key or shortcut to insert ":-".

(I tried a second time hitting tab but this did not do anything. Would this be a good way to speed up typing?)

First 17 18 19 20 21 22 23 Last Page 19 of 2193