MaplePrimes Questions

Error.mw
As the title, I try to solve an ODE:

y(x) = (x - 1)*(x - 3)*diff(y(x), x) + f((x*y(x)^2 - 4*x*y(x) + 3*x - y(x)^2 + 4*y(x) - 1)/(x - 3))
And it seems that the ODE can be solved using Lie Symmetry method. But as I choose f to be a simple exponential function, dsolve fails to give the solution. I also try the DEtools[symgen] and receive the same result.

Can anyone tell me what's the problem? Is there some internal bug?

Executing the code in ?InvertedPendulum produces an error when

sysLin := Linearize(convert(sysEqs, list), [u(t)], [x(t), theta(t)], lin_point)

is executed. The problem is the line where EQ4 is assigned a value.

Something is wrong with the line where EQ4 is assigned a value. It is not executed.
It is like the mode changes to text for that line????

I thought I had post with collection showing timelimit still hangs in Maple. But can't find it searching. I wanted to add this to it.

If someone finds such post, please let me know and I will append this to that post and delete this.

I just found another example where int() hangs all of Maple, using timelimit. I put timelimit of 30 seconds. After 2 hrs it is still running.

Maple 2024.1 on windows 10. This shows clearly that timelimit in Maple still does not work when It was supposed to have been fixed in Maple 2021?

For me, if there is anything that will make me stop using Maple for good, it is this timelimit issue.

Because with timelimit not working all the time, my program keeps hanging. It is not possible to do antything then. Having to keep checking if the program is still running or have hanged and restarting it is not a way to develop software.

Software that have been in development for almost 45 years now like Maple, should have figured by now how to implement timelimit that works. 

Note that, with smaller timelimit it is possible it will  not hang, because longer time limit makes it end in the code path which causes the hang. When I tried 5 seconds for example instead of 30 second, it did not hang With 30 it does. so if you try it and it does not hang, please increase the timelimit a little and it will surely hang. Just make sure to do restart each time, since Maple remembers last result.

maple's server.exe was running at full cpu also.

 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1810 and is the same as the version installed in this computer, created 2024, September 18, 18:16 hours Pacific Time.`

libname;

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

restart;

M:=-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)/(-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)*R+(-6*I*3^(1/6)-2*3^(2/3))*2^(1/3)+2^(2/3)*(I*3^(5/6)-3^(1/3))*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(2/3));
try #this hangs
    timelimit(40,int(M,R));
    print("finished with no timeout");
catch:
    print("waiting for timeout");
end try;

-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)/(-6*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(1/3)*R+(-(6*I)*3^(1/6)-2*3^(2/3))*2^(1/3)+2^(2/3)*(I*3^(5/6)-3^(1/3))*(3^(1/2)*(27*R^2-4)^(1/2)-9*R)^(2/3))

 

 

Download int_hangs_with_timelimit.mw

 

Update OCT 10, 2024

This is another example showing hang in Maple 2024.1 using timelimit. So adding it to this collection. I had large collection of such problems but not able to find it now.

I was trying to verify this solution (which could very well be wrong) on ode with IC. timelimit hangs when I added assumptions as shown. Used 10,20,30 seconds, and so on. all hang. Waited and waited. 

Does it hang on other systems? I am using Windows 10 and Maple 2024.1 with 128 GB RAM on fast CPU.


 

sol:=y(x) = -8/9*x-11/9+1/9*arcsin(1/103*2509^(1/2)*tan(1/5*(x+5/2509*2509^(1/2)*arctan(1/2509*2509^(1/2)*(103*tan(37)+90*sec(37)))-1)*2509^(1/2))*(90*2509^(1/2)*tan(1/5*(x+5/2509*2509^(1/2)*arctan(1/2509*2509^(1/2)*(103*tan(37)+90*sec(37)))-1)*2509^(1/2))-103*(2509*tan(1/5*(x+5/2509*2509^(1/2)*arctan(1/2509*2509^(1/2)*(103*tan(37)+90*sec(37)))-1)*2509^(1/2))^2+2509)^(1/2))/(2509*tan(1/5*(x+5/2509*2509^(1/2)*arctan(1/2509*2509^(1/2)*(103*tan(37)+90*sec(37)))-1)*2509^(1/2))^2+10609)-90/103):
ode:=5*diff(y(x),x) = 7+10*sin(8*x+9*y(x)+11):
IC:=y(1) = 2:
func:=y(x);

y(x)

try
    timelimit(30,`assuming`([odetest(sol,[ode, op(IC)],func)],[positive, func::positive]));
catch:
    print("timed out OK");
end try;
print("After try/catch");

 

Download time_limit_hang_example_oct_10_2024.mw

I would like to officially offer $1,000 prize for any one who can solve the timelimit hanging problem in Maple. Will send you personal check of this amount if you find why it hangs and provide fix to use that I can verify works.

I have an expression equal to the sum of N terms of the form Int(fn=1..N(x), x) and I want to replace each fn(x) by its Taylor (or series) expansion.

When the integrals are definite, like J1 below, I can easily obtain a new expression (K1) where the integrand has been replaced by some expansion.
But when the integral is indefinite, like J2, I get an evaluated expression for K2.

It seems I have to do some gymnastic (J3 --> K3) to get what I want

restart

J1 := Int(sin(p*x), x=0..1);
K1 := eval(J1, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x = 0 .. 1)

 

Int(p*x-(1/6)*p^3*x^3, x = 0 .. 1)

(1)

# undefined integration

J2 := Int(sin(p*x), x);

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x);

K2 := eval(J2, Int = ((a, b) -> Int(mtaylor(a, x=0, 5), b)));

Int(sin(p*x), x)

 

`Expected result` = Int(p*x-(1/6)*p^3*x^3, x)

 

eval(Int(sin(p*x), x), {Int = (proc (a, b) options operator, arrow; Int(mtaylor(a, x = 0, 5), b) end proc)})

(2)

# undefined integration using Intat

J3 := Intat(op(1, J2), op(2, J2)=y);
eval(%, Intat = ((a, b) -> Intat(mtaylor(a, x=0, 5), b))):

K3 := IntegrationTools:-Change(convert(%, Int), y=x, x)

Intat(sin(p*x), x = y)

 

Int(p*x-(1/6)*p^3*x^3, x)

(3)
 

 

Download Integration.mw

Why do I get this unevaluatedform for K2?
Do I have to use Intat to get K3?

Thanks in advance

I want to make a list of ex, and in each of ex contains some item of enumerare. This is my code:

restart;
with(geometry);
mylist := [[-1, 9, -15], [1, -6, -15], [1, -6, 9], [1, 6, 12], [-2, 3, 12], [2, -9, 12], [-1, -6, -9], [-1, -9, -15], [1, 6, -15], [-2, 9, -12], [1, 3, 3], [-1, 6, -9], [3, -4, 2], [-5, 5, -2], [-3, -5, -4], [-2, 1, -3], [-5, -4, -2], [5, 5, 4], [-1, -2, -2], [-3, 1, -5]];
toX := s -> latex(s, output = string);
s := "";
for item in mylist do
    a := item[1];
    b := item[2];
    c := item[3];
    f := x -> a*x^3 + b*x^2 + c*x;
    sol := solve(diff(f(x), x) = 0, x);
    x1 := sol[1];
    x2 := sol[2];
    f2 := diff(f(x), x, x);
    if subs(x = x1, f2) < 0 then
        max_point := [x1, f(x1)];
    elif subs(x = x2, f2) < 0 then
        max_point := [x2, f(x2)];
    else
        max_point := "No maximum";
    end if;
    point(o, 0, 0);
    point(A, x1, f(x1));
    point(B, x2, f(x2));
    AB := simplify(distance(A, B));
    d := Equation(line(k, [A, B], [x, y]));
    lined := sort(sign(coeff(lhs(d), x))*d/igcd(coeff(lhs(d), x), coeff(lhs(d), y)));
    myr := distance(o, k);
    circle_eq := x^2 + y^2 = myr^2;
    s := cat(s, "\\begin{ex}\n", "  Given the function $y = ", toX(f(x)), "$.\n", "  \\begin{enumerate}[label=\\alph*)]\n", "    \\item The derivative of the function is $y'=", toX(diff(f(x), x)), "$.\n", "    \\item The maximum point of the function's graph is $P(", toX(max_point[1]), ", ", toX(max_point[2]), ")$.\n", "    \\item The equation of the line passing through the two extremum points of the graph is $", toX(lined), "$.\n", "    \\item The distance between the two extremum points $A$ and $B$ is $", toX(AB), "$.\n", "    \\item The equation of the circle with center at the origin and tangent to the line passing through the two extremum points is $", toX(circle_eq), "$.\n", "  \\end{enumerate}\n", "\\end{ex}\n\n");
end do;
printf("%s", s);


It seems there is a bug, I get a massage Error, (in geometry:-line) the line is not defined. 

How can I prepare it? and how can I reduce the code? 

Hi,

I recently moved from Windows 10 to Windows 11. I am using Maple 2022.2, and I got that installed and working OK. 

I have four Maple worksheets that I have saved as tasks on Windows 10, but my OS move requires some adjustments. When I try save the modified worksheets to the default Maple help database, I get an error saying that the database is read-only. When I try to make a new database file, Maple asks if it should create it, but then I get an error that Maple can't open the new database.

Suggestions?

Thanks,

Jno.

How do I do the following: 
Im having trouble plotting them on maple 2024 as well

For each function ( f(x) ) given below, define ( F(x) = \integral ,from a to x ,  f(t) \, dt \).

Is \( F(x) \) an antiderivative of \( f(x) \)? Plot \( f(x) \) and \( F(x) \) in the same window for \( x \in [a, b] \). How is \( F(x) \) related to the area between \( f(x) \) and the x-axis on \( [a, b] \)?

(a) ( f(x) = (1/x^2),  a = 1, , b = 10 )

(b) ( f(x) = sin x,  a = 0, , b = pi )

(c) ( f(x) = (1/4) x^4 - 2 x^3+ 4 x^2, , a = 0, , b = 5 )

(d) ( f(x) = (1/4) x^4 - 2 x^3 + 4 x^2, , a = 0, , b = 6 )

.

I reduced the order of two nonlinear equations and solved them numerically in this way. Why are the two results obtained the same?
directdsolve919.mw

I have the function  and derivate with respect to ν and make the change variable ν=1/t it seems it doesn’t work. I put the derivate of 1/t => -1/t2 by hand  (could it be done by “dchange” the hole transformation ?)

I want to approximate the value of the integral. It seems that the solution of the equation and plot in 2 situations for low-frequency ν < 1014  and for high frequency so  when the exponential is dominated.

Thus plot the whole function E2 in the two situations. Could it be done with a series?

For value h := 6.62607015*10^(-34); c := 299792458; T := 273 + 24; k := 1.380649*10^(-23);

ec := 1.602176634*10^(-19); ν1 :=1012 ; ν2 := 1017 ;Tq := 1.765358264*10^(-19);

Could it be merged E2 into one plot for ν = 1012 .. 1017

PPh1.mw

Hi everyone, I wrote a complex 3D curve expression and wanted to calculate its length (0..Pi), but Maple was always calculating and could not get the answer. The code and worksheet are attached.
The idea came from: https://www.mapleprimes.com/questions/239065-Curve-Length-2d-3d

with(plots); with(VectorCalculus)

p1 := spacecurve([t*sin(t/cos(exp(t))), t*cos(t), (2*sqrt(2)*(1/3))*t^(3/2)], t = 0 .. Pi)

 

curve := `<,>`(t*sin(t/cos(exp(t))), t*cos(t), (2*sqrt(2)*(1/3))*t^(3/2))

Vector(3, {(1) = t*sin(t/cos(exp(t))), (2) = t*cos(t), (3) = (2/3)*sqrt(2)*t^(3/2)})

(1)

NULL

x := proc (t) options operator, arrow; t*sin(t/cos(exp(t))) end proc; y := proc (t) options operator, arrow; t*cos(t) end proc; z := proc (t) options operator, arrow; (2/3)*sqrt(2)*t^(3/2) end proc; arcLengthIntegrand := sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2); AL := evalf(Int(arcLengthIntegrand, t = 0 .. Pi)); AL

proc (t) options operator, arrow; VectorCalculus:-`*`(t, sin(VectorCalculus:-`*`(t, cos(exp(t))^VectorCalculus:-`-`(1)))) end proc

 

proc (t) options operator, arrow; VectorCalculus:-`*`(t, cos(t)) end proc

 

proc (t) options operator, arrow; VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, sqrt(2)), 3^VectorCalculus:-`-`(1)), t^VectorCalculus:-`*`(3, 2^VectorCalculus:-`-`(1))) end proc

 

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

 

AL

(2)

NULL

Download length_of_3d_curve.mw

Hi

How we can reduce run time for Cases III and IV ? (Maple 2016)

Thanks alot

Formula_II.mw

Good morning, I am trying to graph the length of the curve but Maple gives me an error. Please if someone can tell me how I can graph the curve in 2d and 3d.

plot([t*sin(t), t*cos(t), (2*sqrt(2))/3*t^(3/2),t, t = 0 .. Pi]) -> error

 

Just one more small geometry task to get to know Maple a little better:
In the 1st quadrant, point A is on the y-axis and points B, D, C are at a positively increasing distance from the origin on the x-axis. Let BD = DC = s/2 and angle ADB = 45°. Point D is therefore the center of BC. The area of ​​triangle ABC is 60, line AD = x and the length of AC = 19. We are looking for the length of line AB = y.

A student wakes up at the end of the lecture and just catches the professor saying:
"... and the roots form an arithmetic sequence."

On the board there is a 5th degree polynomial as homework, but unfortunately the student only manages to write down
x^5 - 5x^4 - 35x^3 +
before the professor wipes the board.

But the student still finds all the roots of the polynomial.

And the roots now have to be calculated.

I have a list

mylist := [[sqrt(-5*x^2 - 5*x - 1) = -4*x - 1, {-1/3, -2/7}], [sqrt(-5*x^2 - 5*x - 1) = x + 1, {-1/2, -2/3}], [sqrt(-5*x^2 - 5*x - 1) = 4*x + 3, {-2/3, -5/7}], [sqrt(-5*x^2 - 5*x + 4) = -5*x + 3, {1/2, 1/3}], [sqrt(-5*x^2 - 4*x + 2) = -5*x + 2, {1/3, 1/5}], [sqrt(-5*x^2 - 4*x + 2) = -2*x + 1, {-1/3, 1/3}]]

I tried
latex(mylist) and get
 

\left[\left[\sqrt{-5 x^{2}-5 x -1} = -4 x -1, \left\{-{\frac{2}{7}}, -
{\frac{1}{3}}\right\}\right], \left[\sqrt{-5 x^{2}-5 x -1} = x +1, 
\left\{-{\frac{2}{3}}, -{\frac{1}{2}}\right\}\right], \left[
\sqrt{-5 x^{2}-5 x -1} = 4 x +3, \left\{-{\frac{5}{7}}, -{\frac{2}{3}}
\right\}\right], \left[\sqrt{-5 x^{2}-5 x +4} = -5 x +3, \left\{{\frac
{1}{2}}, {\frac{1}{3}}\right\}\right], \left[\sqrt{-5 x^{2}-4 x +2} = 
-5 x +2, \left\{{\frac{1}{3}}, {\frac{1}{5}}\right\}\right], \left[
\sqrt{-5 x^{2}-4 x +2} = -2 x +1, \left\{-{\frac{1}{3}}, {\frac{1}{3}}
\right\}\right]\right]

How can I get  a latex like this?

\documentclass[12pt,a4paper]{article}
\usepackage[left=1.5cm, right=1.5cm, top=2cm, bottom=2cm]{geometry}
\usepackage{fouriernc}
\usepackage{enumitem}
\usepackage{amsmath}
\begin{document}
	Solve the following equations:
	\begin{enumerate}[label=\arabic*)]
		\item $\sqrt{-5 x^{2}-5 x -1} = -4 x -1.$ \hfill Answer: $\left\{-{\dfrac{2}{7}}, -{\dfrac{1}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x -1} = x +1.$ \hfill Answer: $\left\{-{\dfrac{2}{3}}, -{\dfrac{1}{2}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x -1} = 4 x +3.$ \hfill Answer: $\left\{-{\dfrac{5}{7}}, -{\dfrac{2}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-5 x +4} = -5 x +3.$ \hfill Answer: $\left\{{\dfrac{1}{2}}, {\dfrac{1}{3}}\right\}.$
		\item $\sqrt{-5 x^{2}-4 x +2} = -5 x +2.$ \hfill Answer: $\left\{{\dfrac{1}{3}}, {\dfrac{1}{5}}\right\}.$
	\end{document}


First 9 10 11 12 13 14 15 Last Page 11 of 2367