Maple 2023 Questions and Posts

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

Hey!

I am having difficulties inputting in text and math mode in my Maple 2023 document. It was working fine in the beginning, but all of a sudden the problem occured. I was restarting maple initially which would temporarily solve the problem, now I cannot input anything after restart. I am doing exam excercises and have been copy/pasting text from a pdf into the document. 

I have tried to install Maple 2024 and open the file but to no avail.  Any help/ pointers would be greatly appreciated.

The attached file -

ml.mw

How do I stop truncation in Maple 2023?  Everything was working fine yesterday but today all of a sudden all assignments are truncated to only 10 digits.

If:

with(Units) :

a_Terra := 149598023.*Unit(km) :
A_Luna := 0.136 :
L_Sol := 3.75E28*Unit(lm) :
S_sphere := r -> 4*Pi*r^2 :

J_Luna := A_Luna*L_Sol/S_sphere(a_Terra) :

Then:

"" gives ""

but

"" gives ""

"" without "evalf" also provides a truncated number instead of showing the "Pi" for an exact value.  So something is wrong in the assignment settings.

Somehow the settings must have changed for how assignments are stored. The answer is irrational with a factor of "1/Pi" and so should not be truncated for calculations.  "a_Terra" is assigned with 9 significant digits ("" km) which I am wondering if maybe why "evalf" is truncating to 10 digits (though it should round and not truncate in that case) but it wasn't doing this before.

"Tools --> Options --> Precision" hasn't changed is set globally to round screen display to 32 decimal places and to round calculation to 64 significant digits.

Verification_known_T_R_30_07_2024.mw That`s the worksheet.

For some strange reason the command simplify doesn`t work. Beforehand it managed to simplify quite bulky expressions.

Thank you in advance!

Is there a way to reassign the arcsecant function "arcsec()" as "asec()" so that "arcsec" can be assigned to the arcsecond unit "Unit(arcsec)"?

Ideally, I would like all of the inverse trigonometric functions to use the shorter notation "asec()" instead of "arcsec()".  I usually do this as aliases, i.e. "alias(asin = arcsin) : alias(asec = arcsec) :" but this won't allow reusing "arcsec" for a unit instead.

Example error for Maple 2023:

alias(asec = arcsec) :
AddUnit(astronomical_unit, context = astronomy, default = true, prefix = SI, conversion = 149597870700*m) : # https://en.wikipedia.org/wiki/astronomical_unit
AddUnit(second, context = angle, spelling = arcsecond, plural = arcseconds, symbol = arcsec, prefix = SI_negative) :

AddUnit(parsec, context = astronomy, default = true, prefix = SI, conversion = AU/tan(arcsec)) ; # https://en.wikipedia.org/wiki/Parsec#Calculating_the_value_of_a_parsec

"Pi/648000" has to be used instead of "arcsec" here when defining the parsec since "arcsec" is already reserved for the arcsecant function, even with "alias(asec = arcsec) ;".

Correction: it looks like the parsec was redefined by the IAU in 2012 as exactly "648000*AU/Pi" without any tangents (or sines) in the definition (so the angle subtended by 1 AU at 1 PC is actually 0.999999999992" not 1").  Both "astronomical_unit" and "parsec" have the wrong values in Maple 2023 which need to be corrected manually.  But the conflict between arcseconds and arcsecants remains the same.

https://iau.org/static/resolutions/IAU2015_English.pdf

https://iopscience.iop.org/article/10.3847/0004-6256/152/2/41

I have a thirder order ODE with non polynomial coefficients and I naively thought to try dsolve for fun to see what happens and Maple returned DESol with a second order differential equation and an arbitrary coefficient. I know Maple outputs DESol when it cannot find a solution similar to RootOf but the arbitrary constant is what is throwing me off. 

I am unsure how to interpret this, if a particular solution is found I could reduce the order and see how I could get with the second order ODE but maple doesn't produce a particular solution when I run that command. 

DESol_Question.mw

I am trying to install Syrup in my home computer (I have it installed in my work computer).  I followed the instructions in the Readme file: 

From Standard Maple:
    Open the file Syrup-Installer.mla.
    To do so, use File -> Open, choose file type 
    "Maple Library Archive (.mla)", select the file, and
    click "Open".

Everything seemed to work and the help page opened up:  But, it is not the syrup help page.  furthermore, when I type ?Syrup, it doesn't open it either.

 

When I try to run a worksheet that uses Syrup (that works on my work computer), I get these errors:

I"m going to reboot now and try again.  

Jorge

Hi all,

I'm new to this software, I've started using it to build myself a spacemouse, and figuring out the "inverse kinematics" involved in its working. I've done a little research on how Maple works, I'm fortunate enough to have a student license, but maybe this problem is above my capacity.

Essentially, I want to control a 6-DOF platform by measuring six distances (with magnetic sensors, but that's not relevant, I believe), from three points forming an equiliateral triangle on the top platform, to six points on the bottom platform. So far I've been able to calculate the effect that each of the degrees of freedom has on the platform and on each of this distances that I want to measure.

But that's where the problem lies. Now I have a system of six equations with six variables and a few parameters, a system that's heavily nonlinear, involving a lot of trig functions and multiplications between them. I've tried to "brute force" a symbolic solution by simply typing in: solve(equations, variables) (note that both equations and variables were properly defined) but Maple just ran for a couple of hours without providing an answer. I don't know if this particular application reaches this software's limits, or if it's me who is doing something wrong.
I'll try to provide the maple Worksheet, I'm still not familiar with this site's formatting, sorry in advance:


restart;
L := Matrix(3, 3, [[cos(theta)*cos(psi), cos(theta)*sin(psi), -sin(theta)], [sin(phi)*sin(theta)*cos(psi) - cos(phi)*sin(psi), sin(phi)*sin(theta)*sin(psi) + cos(phi)*cos(psi), sin(phi)*cos(theta)], [cos(phi)*sin(theta)*cos(psi) + sin(psi)*sin(phi), cos(phi)*sin(theta)*sin(psi) - sin(phi)*cos(psi), cos(phi)*cos(theta)]]);
T := Matrix(3, 3, [[1, psi, -theta], [phi*theta - psi, phi*psi*theta + 1, phi], [phi*psi + theta, psi*theta - phi, 1]]);
p[ni] := Typesetting[delayDotProduct](R, Vector[column](3, [cos(theta[n]), -sin(theta[n]), 0]), true)

p__n := (T . (p[ni])) + Vector[column](3, [u, v, w])

m[m] := R*Vector[column](3, [cos(phi__m), -sin(phi__m), h/R])

`Δp` := p__n - m[m]

with(VectorCalculus)

s[n] := sqrt(`Δp` . `Δp`)

theta[1] := -Pi/12;
theta[2] := Pi/12;
theta[3] := (2*Pi)/3 - Pi/12;
theta[4] := Pi/12 + (2*Pi)/3;
theta[5] := (4*Pi)/3 - Pi/12;
theta[6] := (4*Pi)/3 + Pi/12;

phi[1] := 0;
phi[2] := (2*Pi)/3;
phi[3] := (4*Pi)/3;

s[1] := eval(s[n], {phi__m = phi[1], theta[n] = theta[1]})

s[2] := eval(s[n], {phi__m = phi[1], theta[n] = theta[2]})

s[3] := eval(s[n], {phi__m = phi[2], theta[n] = theta[3]})

s[4] := eval(s[n], {phi__m = phi[2], theta[n] = theta[4]})

s[5] := eval(s[n], {phi__m = phi[3], theta[n] = theta[5]})

s[6] := eval(s[n], {phi__m = phi[3], theta[n] = theta[6]})

 

equations := [-d[1]^2 + s[1]^2 = 0, -d[2]^2 + s[2]^2 = 0, -d[3]^2 + s[3]^2 = 0, -d[4]^2 + s[4]^2 = 0, -d[5]^2 + s[5]^2 = 0, -d[6]^2 + s[6]^2 = 0]

variables := [u, v, w, psi, theta, phi]

solve(equations, variables)

 

So far this is what I've got, thanks in advance for the help.

EDIT: In the beginning of the worksheet two rotation matrices are declared, L and T. T is a "linearized" version of L, assuming small angles, and I'm using it to simplify the expressions. Still there is no luck.

Hello. I am trying to create a procedure that calculates the properties of a triangle (such as the sides, angles, area, and centroid) and then plots it. However, when I try to run my code, I keep getting the error:

Runtime error: Error, (in triangle) illegal use of a formal parameter

Here is the code I am using:

triangle := proc({a::numeric := 0, b::numeric := 0, c::numeric := 0, AngleA::numeric := 0, AngleB::numeric := 0, AngleC::numeric := 0})
    local A, B, C, T, Tr, DegreeA, DegreeB, DegreeC, TA, TB, TC, Area, Centroid, AreaLabel, deg, rad;
    uses geometry, plots;

    # Function to convert degrees to radians
    rad := proc(deg) evalf(deg * Pi / 180) end proc;

    # Function to convert radians to degrees
    deg := proc(rad) evalf(rad * 180 / Pi) end proc;

    # Temporary variables for calculations
    local a_calc, b_calc, c_calc, AngleA_calc, AngleB_calc, AngleC_calc;

    a_calc := a;
    b_calc := b;
    c_calc := c;
    AngleA_calc := AngleA;
    AngleB_calc := AngleB;
    AngleC_calc := AngleC;

    # Calculate missing sides or angles
    if a_calc = 0 then
        if AngleA_calc <> 0 and AngleB_calc <> 0 then
            a_calc := b_calc * sin(rad(AngleA_calc)) / sin(rad(AngleB_calc));
        elif AngleA_calc <> 0 and AngleC_calc <> 0 then
            a_calc := c_calc * sin(rad(AngleA_calc)) / sin(rad(AngleC_calc));
        end if;
    elif b_calc = 0 then
        if AngleB_calc <> 0 and AngleA_calc <> 0 then
            b_calc := a_calc * sin(rad(AngleB_calc)) / sin(rad(AngleA_calc));
        elif AngleB_calc <> 0 and AngleC_calc <> 0 then
            b_calc := c_calc * sin(rad(AngleB_calc)) / sin(rad(AngleC_calc));
        end if;
    elif c_calc = 0 then
        if AngleC_calc <> 0 and AngleA_calc <> 0 then
            c_calc := a_calc * sin(rad(AngleC_calc)) / sin(rad(AngleA_calc));
        elif AngleC_calc <> 0 and AngleB_calc <> 0 then
            c_calc := b_calc * sin(rad(AngleC_calc)) / sin(rad(AngleB_calc));
        end if;
    end if;

    if AngleA_calc = 0 then
        AngleA_calc := deg(arccos((b_calc^2 + c_calc^2 - a_calc^2) / (2 * b_calc * c_calc)));
    end if;
    if AngleB_calc = 0 then
        AngleB_calc := deg(arccos((a_calc^2 + c_calc^2 - b_calc^2) / (2 * a_calc * c_calc)));
    end if;
    if AngleC_calc = 0 then
        AngleC_calc := 180 - AngleA_calc - AngleB_calc;
    end if;

    # Convert angles to radians for calculation
    AngleA := rad(AngleA_calc);
    AngleB := rad(AngleB_calc);
    AngleC := rad(AngleC_calc);

    # Define points A, B, and C
    geometry:-point(A, 0, 0);
    geometry:-point(B, c_calc, 0);
    geometry:-point(C, b_calc * cos(AngleA), b_calc * sin(AngleA));

    # Calculate the area using Heron's formula
    s := (a_calc + b_calc + c_calc) / 2;
    Area := sqrt(s * (s - a_calc) * (s - b_calc) * (s - c_calc));
    Area := evalf(Area, 4);

    # Calculate the centroid of the triangle
    Centroid := [(0 + c_calc + b_calc * cos(AngleA)) / 3, (0 + 0 + b_calc * sin(AngleA)) / 3];

    # Text plot for side labels
    T := plots:-textplot([[1/2 * c_calc, 0, cat("c = ", c_calc), align = below], 
                          [1/2 * c_calc + 1/2 * b_calc * cos(AngleA) + 1/30 * a_calc, 1/2 * b_calc * sin(AngleA), cat("a = ", a_calc), align = right], 
                          [1/2 * b_calc * cos(AngleA) - 1/30 * a_calc, 1/2 * b_calc * sin(AngleA), cat("b = ", b_calc), align = left]]);

    # Text plot for angle labels with valid alignment options
    TA := plots:-textplot([0, 0, cat(evalf(deg(AngleA)), "°"), align = right]);
    TB := plots:-textplot([c_calc, 0, cat(evalf(deg(AngleB)), "°"), align = left]);
    TC := plots:-textplot([b_calc * cos(AngleA), b_calc * sin(AngleA), cat(evalf(deg(AngleC)), "°"), align = above]);

    # Text plot for the area of the triangle
    AreaLabel := plots:-textplot([Centroid[1], Centroid[2], cat("Area= ", Area), align = above]);

    # Display the triangle with labels
    plots:-display([geometry:-draw([geometry:-triangle(Tr, [A, B, C])], 
                      font = [times, roman, 18], labels = [x, y], axes = none, printtext = true), T, TA, TB, TC, AreaLabel]);
end proc:

What am I doing wrong, and how can I fix this error? Thanks! 

When executing the attached work sheet, the output

changes to

Why is that (local seetings maybe?) and how to reproduce the former, more compact output?

Copy-pasted from the wonderful:

Advanced Engineering Mathematics

Dr. Robert J. Lopez

Emeritus Professor of Mathematics

Maple Fellow

© Maplesoft, a division of Waterloo Maple Inc., 2023

This is obtained in Maple by writing the differential equation

 

q := diff(x(t),t) = k*(40 - 16/18*x(t))*(8 - 2/18*x(t));

diff(x(t), t) = k*(40-(8/9)*x(t))*(8-(1/9)*x(t))

(1)

 

and solving via the syntax

 

X := simplify(rhs(dsolve({q,x(0)=0},x(t))));

(-360+360*exp((8/3)*t*k))/(8*exp((8/3)*t*k)-5)

(2)

 

The differential equation is actually separable, and can be solved with the techniques of elementary calculus discussed in Section 3.1.

 

If an observation provides the data that at time t = 1 there were 6 grams of water, then the constant of proportionality k can be computed.  In Maple, the data point gives the equation

 

eq := eval(X, t=1) = 6;

(-360+360*exp((8/3)*k))/(8*exp((8/3)*k)-5) = 6

(3)

 

whose solution is

 

K := solve(eq,k);

(3/8)*ln(55/52)

(4)
 

 

Download Output_formated_with_rational_factor_.mw

Hello, 

do you have an idea how could be filtered several values from dataframe? 
I have a dataframe called "TestData". I need to select rows from data frame which are equal to the list called "SelectionList". 

Thank you for a comment. 
 

Data:=<"LC1", "LC2", "LC3", "LC4", "LC5", "LC6", "LC7", "LC8", "LC9", "LC10", "LC11", "LC12", "LC13", "LC14", "LC15", "LC16", "LC17", "LC18", "LC19", "LC20">;
LoadValue2:=<10,15,100,82,18,89,25,84,46,18,79,12,0,28,147,15,86,444,18,65>;

TestData:=DataFrame(<Data|LoadValue2>,columns=[Case,Load]);

SelectionList:={"LC3", "LC4", "LC5", "LC6", "LC7", "LC8", "LC9"};

As Maple is not equipped to handle numerical solutions of elliptic PDEs, can anyone help top solve PDEs by finite differences or any other numerical solver?

pde.mw

I have two surfaces crossing the z=0 plane for some ranges of x and y values.

For the first surface, x=Gamma is bounded between 0 and 10 and y=rho between -1 and +1. For the second surface, x=Gamma_1 is bounded between 0 and 10 and y=Gamma_2 between 0 and 10 as well. I want to clearly identify (parametric):

  1. For which Gamma and rho ranges of values the first surface is positive (and for which negative)
  2. For which Gamma_1 and Gamma_2 ranges of values the second surface is positive (and for which negative)

Worksheet: sign_regions.mw (highlighted in yellow my two failed attempts)

how to solve this using integration by parts?

restart:

with(IntegrationTools):

``

eq1:=int(1-(sum(p[i]*(1-exp(-((t-xi)/tau[i]))),i=1..n)),xi=0..t);

int(1-(sum(p[i]*(1-exp(-(t-xi)/tau[i])), i = 1 .. n)), xi = 0 .. t)

(1)


Download 1111.mw

weibull_damage.mw
i have weibull plot...and i want to get size and shpae parametr...how can i get ...parameters .i don't know how to perform linear regression to get these parameters in maple..please help

I am using fsolve() to solve a highly nonlinear system of 6 equations in 6 variables: lambda_d1, lambda_i1, lambda_d2, lambda_i2, lambda_d3, lambda_i3.

fsolve() doesn't "solve"! I usually help fsolve() with some initial conditions and with the expected signs of the solution but in this case it's not enough. I noticed that if I comment out the expected signs line (that is, if I don't impose my 6 lambdas to be strictly positive), the fsolve() works.
How do I help fsolve() to pin down only positive solutions at each iteration? I have no reasons to believe that there aren't any positive solutions for all 6 lambdas...

Worksheet: fsolve_help.mw

thank you.

2 3 4 5 6 7 8 Last Page 4 of 31