MaplePrimes Questions

This is an ode from textbook. dsolve gives new error I have not seen before. 

Maple 2024.2 on windows 10.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1839 and is the same as the version installed in this computer, created 2024, December 2, 10:11 hours Pacific Time.`

restart;

libname;

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

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

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

dsolve(ode);

Error, (in factor) too many levels of recursion

infolevel[dsolve]:=5;

5

dsolve(ode);

Methods for third order ODEs:

--- Trying classification methods ---

trying 3rd order ODE linearizable_by_differentiation

differential order: 3; trying a linearization to 4th order

trying differential order: 3; missing variables

trying differential order: 3; exact nonlinear

trying 3rd order, integrating factor of the form mu(y'') for some mu

Trying the formal computation of integrating factors depending on any 2 of [x, y, y', y'']

         *** Sublevel 2 ***

         Methods for first order ODEs:

         --- Trying classification methods ---

         trying a quadrature

         trying 1st order linear

         <- 1st order linear successful

Successful computation of 3 integrating factors: [x*exp(-1/2*x^2*(I*2^(1/2)+1))*KummerM(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2)/y(x), x*exp(-1/2*x^2*(I*2^(1/2)+1))*KummerU(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2)/y(x), x*exp(-1/2*x^2*(I*2^(1/2)+1))*(Int(x*KummerM(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2)*exp(-1/2*x^2*(I*2^(1/2)-1)),x)*KummerU(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2)-Int(x*KummerU(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2)*exp(-1/2*x^2*(I*2^(1/2)-1)),x)*KummerM(3/4+1/8*I*2^(1/2),3/2,I*2^(1/2)*x^2))/y(x)]

Attempting computing related first integrals...

Error, (in factor) too many levels of recursion

 

 

Download dsolve_factor_dec_24_2024.mw

tracelast;  gives long output with this at end

#(IntegrationTools:-Indefinite:-Polynomial,14): return poly/primitivepart*thisproc(primitivepart,var)
 IntegrationTools:-Indefinite:-Polynomial called with arguments: (8*I)*x*KummerM(3/4+((1/8)*I)*2^(1/2), 3/2, I*2^(1/2)*x^2)*x1*2^(1/2)-(3*I)*2^(1/2)*KummerM(3/4+((1/8)*I)*2^(1/2), 3/2, I*2^(1/2)*x^2)*y+(7*I)*2^(1/2)*KummerM(((1/8)*I)*2^(1/2)+7/4, 3/2, I*2^(1/2)*x^2)*y+12*x^2*KummerM(3/4+((1/8)*I)*2^(1/2), 3/2, I*2^(1/2)*x^2)*y+8*x*KummerM(3/4+((1/8)*I)*2^(1/2), 3/2, I*2^(1/2)*x^2)*x1+4*KummerM(((1/8)*I)*2^(1/2)+7/4, 3/2, I*2^(1/2)*x^2)*y, x1, nofactor = false
 #(IntegrationTools:-Indefinite:-Polynomial,8): newpoly := factor(poly)
Error, (in factor) too many levels of recursion
 locals defined as: p = p, primitivepart = primitivepart, base = base, exponent = exponent, subpolys = subpolys, change = change, newpoly = newpoly, u = u

Also, this error can not be cought using try/catch. 

I cannot find any examples of how to raise the software memory limits to maximum with the mentioned  -T switch in the manual to avoid memory allocation error popup.

Neither are there any examples posted on the web.

It cannot be a hardware allocation error, as the system memory is large.

So how is the -T switch implimented

I'm working on solving a system of ODEs in Maple that models an epidemic scenario, tracking the number of susceptible, infected, and recovered individuals over time. Here's what I've done so far:
Download sir_model.mw

Created a table of results at daily intervals with the following code:

results := [seq([t = tval, s = round(evalf(sol(tval)[2][1])), i = round(evalf(sol(tval)[2][2])),r = round(evalf(sol(tval)[2][2]))], tval = 0 .. 50)];

printf("%-10s %-15s %-15s %-15s\n", "Day", "Infected", "Recovered");
printf("---------------------------------------------\n");
for entry in results do
    printf("%-10d %-15d %-15d %-15d\n", entry[t],entry[s], entry[i], entry[r]);
end do;

but I encountered an error (in fprintf) integer expected for integer format

Hi,

just a quick question: Is it possible to customize the default worksheet with my own settings/styles, such that my settings are loaded automically when I create a new worksheet? I've tried to change my settings/styles and apply that globally but, once I leave MF and re-launch it, my settings/styles are not loaded.

Thanks very much in advance.

Hello, I have a question regarding finding two vectors that result in a resulting vector with only the directions of the two needed vectors.

Given:

- Vector F_RC1

- Unit Vector of F_RC1Y (called EV_C1Y)

- Unit Vector of F_RC1_ST (called EV_C1_ST)

Needed

- F_RC1_ST

- F_RC1Y

The picture below and the file should make it clear. 

vector_question.mw

How do I approach this? Best regards,

I knowI can use a loop but I would like something neater. igcd can be applied to a list. Is there a way to map or use @ to apply gcd to a list?

lst:= [4, 2, 8, 4];
lst1 := [a^3/10, -a^2/2, a, a^4/4]
                      lst := [4, 2, 8, 4]

                        [1   3    1  2     1  4]
                lst1 := [-- a , - - a , a, - a ]
                        [10       2        4   ]


gd:=igcd(lst);



                            gd := 2

gd1=(gcd@op)(lst1);

 

Maple's Student:-ODEs:-ODESteps solves an ode by doing change of variable on the independent variable, but the resulting ode is wrong and final answer is wrong.

Here is one such example

restart;
ode:=diff(diff(y(x),x),x)*sin(x)^2 = 2*y(x);
Student:-ODEs:-ODESteps(ode):

But this result is wrong. First of all, we can not have both x and t  in the same ode. This is what dchange gives

ode:=diff(y(x),x$2)*sin(x)^2-2*y(x)=0;
tr:={PDEtools:-Solve(t=ln(x),x)};
simplify(PDEtools:-dchange(tr,ode,[t]))

It looks like Student:-ODEs:-ODESteps is trying to solve  sin(x)^2*y'' + 2 y=0 as EULER type ode.

But Euler type ode will look like  x^2*y'' +2 y=0  

It seems to have confused sin(x)^2 with x^2. This change of variable it used only works for EULER type ode with polynomial coefficient, not trig coefficients.

Maple 2024.2 on Windows 10

 

restart;

Let x be some name:

x := asdf;

asdf

I wish to make a new name, y, whose value is the first character in x:

convert(x, string):
y := convert(%[1], name);

a

That works but seems too convoluted.  Is there a better way of doing that?

i already use this method for a lot of equation but this time something not normal hapening what is problem?

``

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

``

eq0 := -4*alpha*k^2*m^2*n^2*A[0]^2+4*beta*k*m*n^2*A[0]^3-4*gamma*k*m*n^2*A[0]^3+4*delta^2*m*n^2*A[0]^2-4*n^2*sigma*A[0]^4-4*m*n^2*w*A[0]^2 = 0

eq1 := -8*alpha*k^2*m^2*n^2*A[0]*A[1]+12*beta*k*m*n^2*A[0]^2*A[1]-12*gamma*k*m*n^2*A[0]^2*A[1]+8*delta^2*m*n^2*A[0]*A[1]-16*n^2*sigma*A[0]^3*A[1]+2*a*alpha*m*n*A[0]*A[1]-8*m*n^2*w*A[0]*A[1] = 0

eq2 := -4*alpha*k^2*m^2*n^2*A[1]^2+12*beta*k*m*n^2*A[0]*A[1]^2-12*gamma*k*m*n^2*A[0]*A[1]^2+4*delta^2*m*n^2*A[1]^2-24*n^2*sigma*A[0]^2*A[1]^2+a*alpha*m^2*A[1]^2+3*alpha*b*m*n*A[0]*A[1]-4*m*n^2*w*A[1]^2 = 0

eq3 := 4*beta*k*m*n^2*A[1]^3-4*gamma*k*m*n^2*A[1]^3-16*n^2*sigma*A[0]*A[1]^3+alpha*b*m^2*A[1]^2+alpha*b*m*n*A[1]^2+4*alpha*c*m*n*A[0]*A[1] = 0

eq4 := -4*n^2*sigma*A[1]^4+alpha*c*m^2*A[1]^2+2*alpha*c*m*n*A[1]^2 = 0

C := solve({eq0, eq1, eq2, eq3, eq4}, {a, b, c, `__ `*A[0]})

Warning, solving for expressions other than names or functions is not recommended.

 

(1)
 

NULL

Download problem.mw

Can someone tell me how to calculate the Christoffel symbols in spherical coordinates in Euclidean three dimensional space?

Thank you very much in advance!

Hello 

I am working on my vector file and have another question:

1. How do I display any vectors in a matrix notation next to each other or above each other (like: [1;2;3]) 

Find attached the file:question_vector_.mw

I really appreciate any help you can provide.

At the end of this link - (2.14) and (2.15) - the problem and the solution have the same maple code, so I don't understand how to solve the problem.

https://www.maplesoft.com/support/help/Maple/view.aspx?path=isimplicitlydeclaredlocal

Is it possible to have a variable in a filename ?

as an example if I save a file by


save M, "Result(Variable).txt";

So If Variable is e.g. set to

Variable:=10;
then the filename saved should be
Result(10).txt

It is not that this a terribly difficult to work out, but I feel I am probably missing something. I need to check if a 3D point lies on a 3D line. What is a good approach here. I started of with the idea all alpha's are equal. but there are exceptions. See P3 and P4

restart

NULL

l := `<,>`(3+2*alpha, 1+6*alpha, 4-5*alpha)

Vector[column](%id = 36893489809910741940)

(1)

NULL

P := [9, 19, -11]

[9, 19, -11]

(2)

seq(solve({l[i] = P[i]}, alpha), i = 1 .. 3)

{alpha = 3}, {alpha = 3}, {alpha = 3}

(3)

l1 := `<,>`(3+2*alpha, 1+0*alpha, 4-5*alpha)

Vector[column](%id = 36893489809910721460)

(4)

P1 := [9, 1, -11]

[9, 1, -11]

(5)

seq(solve({l1[i] = P1[i]}, alpha), i = 1 .. 3)

{alpha = 3}, {alpha = alpha}, {alpha = 3}

(6)

l2 := `<,>`(3+2*alpha, 1+0*alpha, 4-0*alpha)

Vector[column](%id = 36893489809910705556)

(7)

P2 := [9, 1, 4]

[9, 1, 4]

(8)

seq(solve({l2[i] = P2[i]}, alpha), i = 1 .. 3)

{alpha = 3}, {alpha = alpha}, {alpha = alpha}

(9)

l3 := `<,>`(3+2*alpha, 0+0*alpha, 4-0*alpha)

Vector[column](%id = 36893489809963852012)

(10)

P3 := [9, 0, 4]

[9, 0, 4]

(11)

seq(solve({l3[i] = P3[i]}, alpha), i = 1 .. 3)

{alpha = 3}, {alpha = alpha}

(12)

P4 := [9, 0, -2]

[9, 0, -2]

(13)

seq(solve({l3[i] = P4[i]}, alpha), i = 1 .. 3)

{alpha = 3}, {alpha = alpha}

(14)

 

Download 2024-12-21_Q_3D_point_lies_on_3D_line.mw

First 11 12 13 14 15 16 17 Last Page 13 of 2393