MaplePrimes Questions

Hello, I have the problem where my Maple worksheet involves very high-precision calculations which result in graphs with a large number of data points. This can result in the file being hundreds of MB large. However, I do not need to necessarily save all these data points inside the worksheet itself since they can easily be recreated. To save disk space, I would prefer to only save the generating commands and not any plots or array data, etc. Is there a way to do this?

simp.mw

please see simp.mw file

How did Student:-ODEs:-ODESteps([ode,ic]); managed to get this zero solution to this ode? I can't follow the logic it did.

Any ideas what it is doing in the 4th step there?
 

13496

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode := diff(y(x), x) = y(x)*(2*y(x) - x)/(x*(-2*x + 3*y(x)));
ic:=y(1)=-1;
dsolve([ode,ic]);

diff(y(x), x) = y(x)*(2*y(x)-x)/(x*(-2*x+3*y(x)))

y(1) = -1

y(x) = (1/6)*(I*((-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(2/3)-x^2)*3^(1/2)-((-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(1/3)-x)^2)/(-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(1/3)

#now try ODEsteps
Student:-ODEs:-ODESteps([ode,ic]);
 

"[[,,"Let's solve"],[,,[(ⅆ)/(ⅆx) y(x)=(y(x) (2 y(x)-x))/(x (-2 x+3 y(x))),y(1)=-1]],["•",,"Highest derivative means the order of the ODE is" 1],[,,(ⅆ)/(ⅆx) y(x)],["•",,"Solve for the highest derivative"],[,,(ⅆ)/(ⅆx) y(x)=(y(x) (2 y(x)-x))/(x (-2 x+3 y(x)))],["•",,"Use initial condition" y(1)=-1],[,,0],["•",,"Solve for" 0],[,,0=0],["•",,"Substitute" 0=0 "into general solution and simplify"],[,,0],["•",,"Solution to the IVP"],[,,0]]"

odetest(y(x)=0,[ode,ic])

[0, -1]

 


 

Download strange_ode_steps_solution_june_20_2024.mw

(Tested on Maple 2021.1 and 2024.0, on Mac)

I want to write a Maple procedure that takes advantages of the latest features but doesn't break on older versions of Maple.

So I can write something like this:

   if version() >= VERSION then new_method else old_method end if

This works, but it has the problem that the version( ) command not only returns a version number but also writes three lines to the screen, like this:

 User Interface: 1794891
         Kernel: 1794891
        Library: 1794891

I don't want those lines to appear every time the procedure is used but I don't know how to make them go away.  Is there a way, or is there a better approach to achieving what I want?

Thanks, Brendan.

When I began posting replies or answers in Mapleprimes I remember Carl Love explaining me the difference between them.
I was a newbie by then but I think I've grown up and now I know the difference between a reply and a comment.
For reasons of my own, which I will perhaps explain in a post one day, I have decided to sent only comments and no more answers.

Unfortuntely administrators, or maybe a robot, keep turning my comments into answers.
Which in turn forces me to convert these answers into comments, which are then converted back into answers... which may never end and is a complite waste of time.

Is there a way to declare that I want my choices to be respected?

(For the record I've even written in the header of my comment that I didn't want it to be converted into an answer, but the comment was removed and the conversion done !)

Hello everyone

I need help solving a system of equations as below. I'm looking for a way to do it, but I don't understand the general concept of how such an equation is calculated. So far I've been using a package in LabVIEW that worked similarly to Simulink and that was clear to me, whereas here I'm overwhelmed by the multitude of options and that's why I'm asking for help.

I need to solve these equations analogously to Matlab-Simulink, i.e., a time interval and integration step, and a numerical procedure in symbolic versions.

Help_me.mw

Hi MaplePrimes,

I have decided to look for an odd perfect number.  
I want Maple code to determine if there is a perfect number beween bounds on a factor.
For definitions of deficient and perfect and abundant numbers, see
https://mathworld.wolfram.com/DeficientNumber.html
https://mathworld.wolfram.com/PerfectNumber.html
https://mathworld.wolfram.com/AbundantNumber.html

I need some sort of loop that closes in on the edge of abundant/deficient numbers.

Specifically, an IF() statement is needed about wheather the function

sigma(a)-2*a is positive or negative.

Regards,

Matt

abundant_edge_30.mw

I see this question https://mathematica.stackexchange.com/questions/304317/how-to-draw-a-number-of-circles-inscribed-in-a-square-so-that-the-sum-of-the-rad

I have a square with length of side is $a$. How to draw a number of circles inscribed in a square so that the sum of the radii of the circle is greatest? In the below picture is twenty circles inscribed in a square. We can consider number of circles are 5, 6, ... We consider number of the circles is fixed.

How can I tell Maple to do that.

Have a list of four projective points. I need to check that they are colinear projectively. If one point is at infinity i.e. 0 in z position I can chech if combination of cross product and dot product is 0.
a)  What is a good way to find if one ot the four has zero in z position?

b) Having found that is there a neat way of piching the next two/three points by making the count wrap automatically. e.g 3  then 4,5,6 i.e. 3,4,1,2

restart

with(LinearAlgebra)

pt := [`<,>`(1, 1, 1), `<,>`(2, 1, 1), `<,>`(3, 1, 0), `<,>`(4, 1, 1)]

pt := [Vector(3, {(1) = 1, (2) = 1, (3) = 1}), Vector(3, {(1) = 2, (2) = 1, (3) = 1}), Vector(3, {(1) = 3, (2) = 1, (3) = 0}), Vector(3, {(1) = 4, (2) = 1, (3) = 1})]

(1)

ListTools(Occurences([anything, anything, 0], pt))

ListTools(Occurences([anything, anything, 0], [Vector(3, {(1) = 1, (2) = 1, (3) = 1}), Vector(3, {(1) = 2, (2) = 1, (3) = 1}), Vector(3, {(1) = 3, (2) = 1, (3) = 0}), Vector(3, {(1) = 4, (2) = 1, (3) = 1})]))

(2)

``

`&x`(pt[1]-pt[3], pt[1]-pt[3]).(pt[4]-pt[3])

0

(3)

NULL

Download 2024-06-18_Q_4_points_projective_colinear.mw

I was wondering if Maple could be setup in a way that no parallel processing is performed (as on a single core)?

I know, it's a poor way to test an algorithim/method for thread safety (i.e. deterministic behaviour). But it is better than nothing.

Are there other ways to test for thread safety?

I am getting Maple server crash each time running this solve command.

Could others reproduce it? I am using windows 10. Maple 2024.  Why does it happen?

Will report it to Maplesoft in case it is not known. Worksheet below.

22396

restart;

23484

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762 and is the same as the version installed in this computer, created 2024, June 13, 11:3 hours Pacific Time.`

sol:=(3^(1/2)*u(x)-1/3*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^(1/3*3^(1/2)) = x^(1/3*3^(1/2))*c__1;

(3^(1/2)*u(x)-(1/3)*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

eval(sol,u(x) = u);

(3^(1/2)*u-(1/3)*3^(1/2)+(3*u^2-2*u-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

timelimit(30,[solve(%,u)]);


 

Download maple_crash_calling_solve_june_18_2024.mw

This bug seems to have been introduced in Maple 2023 since it crashes there also.

But not in Maple 2022. No crash there. Same PC.

22396

restart;

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1401 created 2023, March 2, 10:49 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2022\Physics Updates\lib\`

sol:=(3^(1/2)*u(x)-1/3*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^(1/3*3^(1/2)) = x^(1/3*3^(1/2))*c__1;

(3^(1/2)*u(x)-(1/3)*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

eval(sol,u(x) = u);

(3^(1/2)*u-(1/3)*3^(1/2)+(3*u^2-2*u-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

solve(%,u);

(1/18)*3^(1/2)*(3*(x^((1/3)*3^(1/2))*c__1)^(3^(1/2))+2*3^(1/2)+4*(x^((1/3)*3^(1/2))*c__1)^(-3^(1/2)))

 

 

Download maple_NO_crash_calling_solve_june_18_maple_2022.mw

I want to solve for the intrinsic frequency of a structure by using the equation of the determinant of a matrix equal to 0. I don't know if this is the correct procedure. Also the result is too complicated, what does z mean? Is it possible to simplify the result?

 

odeadvisor says that this ode is _homogeneous, `class A`, but I am not able to verify this. Also when asking dsolve to solve it as 'homogeneous' it returns no solution. 

This type is described in https://www.maplesoft.com/support/help/maple/view.aspx?path=odeadvisor%2fhomogeneous

Here is worksheet with my tries.

Would someone be able to confirm if this is really an _homogeneous, `class A` ?

my own code checking says no.  But if it is, then why dsolve do not solve it when asking it to use homogeneous method? Is the method I asked it to use it do not apply to class A?

30348

restart;

30348

ode:=x + diff(y(x), x)*y(x)*(2*diff(y(x), x)^2 + 3) = 0;
DEtools:-odeadvisor(ode);

x+(diff(y(x), x))*y(x)*(2*(diff(y(x), x))^2+3) = 0

[[_homogeneous, `class A`], _dAlembert]

infolevel[dsolve]:=5;
dsolve(ode,y(x))

 

5

Methods for first order ODEs:

   *** Sublevel 2 ***

   Methods for first order ODEs:

   -> Solving 1st order ODE of high degree, 1st attempt

   trying 1st order WeierstrassP solution for high degree ODE

   trying 1st order WeierstrassPPrime solution for high degree ODE

   trying 1st order JacobiSN solution for high degree ODE

   trying 1st order ODE linearizable_by_differentiation

   trying differential order: 1; missing variables

   trying simple symmetries for implicit equations

   <- symmetries for implicit equations successful

y(x) = -((1/2)*I)*2^(1/2)*x, y(x) = ((1/2)*I)*2^(1/2)*x, y(x) = RootOf(-ln(x)+Intat(-(-2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2+2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3-((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)+_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)+_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+c__1)*x, y(x) = RootOf(-2*ln(x)+Intat(((2*I)*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)*_a^2+I*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)-2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2-4*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3+I*3^(1/2)*_a^2-((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)-2*_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)+_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+2*c__1)*x, y(x) = RootOf(-2*ln(x)-Intat(((2*I)*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)*_a^2+I*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)+I*3^(1/2)*_a^2+2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2+4*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3+((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)+2*_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)-_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+2*c__1)*x

dsolve(ode,y(x),[homogeneous])

Classification methods on request

Methods to be used are: [homogeneous]

Successful isolation of dy/dx: 3 solutions were found. Trying to solve each resulting ODE.

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

sol:=PDEtools:-Solve(ode,diff(y(x),x));

diff(y(x), x) = (1/2)*2^(1/3)*(-y(x)^2*2^(1/3)+((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3)), diff(y(x), x) = -(1/4)*2^(1/3)*(I*3^(1/2)*y(x)^2*2^(1/3)+I*3^(1/2)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3)-y(x)^2*2^(1/3)+((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3)), diff(y(x), x) = (1/4)*2^(1/3)*(I*3^(1/2)*y(x)^2*2^(1/3)+I*3^(1/2)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3)+y(x)^2*2^(1/3)-((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3))

map(X->DEtools:-odeadvisor(X),[sol])

[[[_homogeneous, `class A`], _dAlembert], [[_homogeneous, `class A`]], [[_homogeneous, `class A`]]]

map(X->dsolve(X,y(x),[homogeneous]),[sol])

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

[]

 

 

Download checking_homogo_ode_type_june_18_2024.mw

Hi everyone...
if f(x,y)=x+y
How can I calculate the following expressions for derivative of y(i) where i=1...n?

Hello guys, I am doing the numercial error analysis study, but now I meet such problem:
how to change the 2d dot plot to the 3d plot? I mean extending like the generatrix of a cylinder.
It can be understood as the inverse operation of projecting a three-dimensional xyz surface onto the xy plane. the code is attached. Welcome all you discuss.

First 95 96 97 98 99 100 101 Last Page 97 of 2426