MaplePrimes Questions

I found a case where PDEtools:-Solve fail and solve works. I do not understand why. 

Is this a bug or what is going on? I thought they should give same result.


 

restart;

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 1787 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

libname;

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

restart;

eqs:=[-2*arctanh((_C1-1)^(1/2)/_C1^(1/2)) = _C2, 0 = _C1^(3/2)*tanh(1/2*_C2)*sech(1/2*_C2)^2];
unknowns:={_C1,_C2};

[-2*arctanh((_C1-1)^(1/2)/_C1^(1/2)) = _C2, 0 = _C1^(3/2)*tanh((1/2)*_C2)*sech((1/2)*_C2)^2]

{_C1, _C2}

sol1:=solve(eqs,unknowns);

{_C1 = 1, _C2 = 0}

sol2:=PDEtools:-Solve(eqs,unknowns);

 


 

Download why_PDEtools_Solve_fail_august_14_2024.mw

 

I am very confused about this result. 

I call the result of odetest the residual. Which should be zero or simplifies to zero if dsolve solution is correct.

Now, if I do     odetest(solution,ode), I get residual which simplifies to zero. OK. But doing odetest(solution,[ode,IC]) now gives output for the ode residual (first entry) completely different than the first case and which can't be simplified to zero any more. 

odetest also says the solution satisfies the IC, since the second entry of the residual is zero.     

So we have case where the solution satisfies the ODE itself and also satisfies the IC. But when calling odetest with both the ode and the IC, now it says the solution does not satisfiy the ode.

How could this be? What Am I overlooking here? Should not the ode residual remain the same in both calls?

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 1787 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

restart;

ode:=diff(y(x), x, x) = sqrt(1 + diff(y(x), x)^2);

diff(diff(y(x), x), x) = (1+(diff(y(x), x))^2)^(1/2)

IC:=y(0)=1;

y(0) = 1

sol:=[dsolve([ode,IC])][-1]; #just interested in last solution now

 

y(x) = cosh(x+c__1)+1-cosh(c__1)

residual:=odetest(sol,ode)

cosh(x+c__1)-(1/2+(1/2)*cosh(2*x+2*c__1))^(1/2)

simplify(residual) assuming positive;

0

#Why now the residual changes on the ode??
residual:=odetest(sol,[ode,IC])

[cosh(c__1)*cosh(x)+sinh(c__1)*sinh(x)-(1+sinh(x)^2*cosh(c__1)^2+2*sinh(x)*cosh(c__1)*cosh(x)*sinh(c__1)+cosh(x)^2*sinh(c__1)^2)^(1/2), 0]

#no longer simplifes to zero.
map(X->(simplify(X) assuming positive),residual)

[cosh(c__1)*cosh(x)+sinh(c__1)*sinh(x)-(1+sinh(x)^2*cosh(c__1)^2+2*sinh(x)*cosh(c__1)*cosh(x)*sinh(c__1)+cosh(x)^2*sinh(c__1)^2)^(1/2), 0]

 

 

Download odetest_problem_august_14_2024.mw

Hello

I need to use the Ritt algorithm to find the characteristic sets of a set of differential equations. In the past, it seems there was a Maple package by D. Wang available through Maple Applications, but this no longer appears to be the case. I managed to download an old set of files from the author’s site, dated February 1996, which is a Maple V3 package. The instructions in the Readme file mention that using the provided Makefile, an m-file containing all the functions will be created, which can then be loaded into Maple. Unfortunately, running make -f Makefile did not create anything, so I am wondering if I could get some assistance on how to convert this package to something compatible with the latest Maple releases.

The source (txt) files are structured as follows:

Example: 


1) Comments
2) Definition of the User functions - something like

 

dcharsets[dcharset] := proc() `charsets/d_charset`(args) end:

dcharsets[dmcharset] := proc() `charsets/d_mcharset`(args) end:

dcharsets[dcs] := proc() `charsets/d_charser`(args) end:

dcharsets[dmcs] := proc() `charsets/d_mcs`(args) end:

dcharsets[dics] := proc() `charsets/d_ics`(args) end:

and

read `charsets.m`:

# set of non-zero remainders of d-polys in ps wrt d-ascending set as
#       user level function
`charsets/d_remset` :=

subs(`charsets/class`=`charsets/d_class`,
     `charsets/remseta`=`charsets/d_remseta`,
     `charsets/premas`=`charsets/d_premas`,op(`charsets/remset`)):

and lots of Maple procedures - Example below

 

`charsets/d_charset` := proc(ps,lst,medset)

....

end:

the source file ends with the following lines.

read dhelp;
save `dcharsets.m`:
quit

Many thanks

 

Note: Before posting this question here, I tried to contact the author but received no response.

I am attaching a sheet where i found error in the optimization function. Its not considering constrain C3 and C5 . Can anyone help?
N_7.mw

Also in the plot the tau1 value remain same for the optimal lambda. What parameter in the model can be changed in DATA so that i get dome like structure? 

Hi,
 i observe this error as if a sum() was used instead of a add() in dsolve

> assume(g > 0): dsolve({diff(r(t), t$2) + g * t * r(t), r(0) = r0, D(r)(0) = r1},  r(t));
Error, (in dsolve) unsupported type of index, _a

any help or advice, please ?

Sincerely.

Definition Let "F"  be a field with f(x), g(x), p(x) being polynomials in F[x] and "p(x)" nonzero. Then if "p(x)|f(x)-g(x)" we say "f(x)" is congruent to "g(x)" modulo "p(x)". 
               
For example, in Q[x], x^2+x+1 is congruent to x+2 modulo x+1 because (x^2+x+1)-(x+2) = x^2-1=(x+1)(x-1).

This congruence among polynomials is similar, but not quite the same as congruence among integers.

Is there a way, in Maple, to solve problems like this? Could Maple tell me, for example, what polynomials are congruent to x^2+x+1 modulo x+1? An answer might be in the form x^2 +x+1 belongs to [x-1], an  equivalence class of polynomials.

I have not been able to find any such function in Maple, nor any calculator for it on the web. Maybe I'm not using the right search terms.

Hello, consider 0<x<1, 0<y<1 and t >0 (t: fixed)

Let the region:
R={(x,y) | x*(1-y)/y*(1-x) < t}

How can I draw the region R in Maple. thanks.

I am attaching the sheet, I want to solve for w or find range of w. 
q1.mw

I noticed sometimes Maple dsolve solves an ode using a method different than what odeadvisor says it is.

In this example ode, advisor said it is separable. But when solving it, dsolve actually solved it as dAlembert.

Why is that? Should not these be the same?

I also noticed Maple does not verify the solution of the ode when asked to solve it as separable, which is what the advisor says. But it does verify the solution using dAlembert.

So in this example, should not advisor have said this ode is dAlembert and not separable then?

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 1786 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

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

y(x) = x+3*ln(diff(y(x), x))

[_separable]

infolevel[dsolve]:=5:
sol_1:=dsolve(ode);

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 d'Alembert

<- d'Alembert successful

y(x) = x, y(x) = x+3*ln(exp(-(1/3)*x)*c__1/(-1+exp(-(1/3)*x)*c__1))

map(X->odetest(X,ode),[sol_1]);

[0, 0]

sol_2:=dsolve(ode,[separable]);

Classification methods on request

Methods to be used are: [separable]

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

* Tackling ODE using method: separable

--- Trying classification methods ---

trying separable

<- separable successful

y(x) = -3*ln(exp(-(1/3)*x)-(1/3)*c__1)

#notice, solution does not verify.
odetest(sol_2,ode);

-3*ln(3*exp(-(1/3)*x)-c__1)-x-3*ln(exp(-(1/3)*x)/(3*exp(-(1/3)*x)-c__1))

 

 

Download why_different_method_used_august_13_2024.mw

I use a procedure called Isee  to print to screen procedures from my packages.

However if the procedure is overloaded it Isee doesn't print it. Is there a way around this.
I have inserted screen shots to show the outputs for the package.

restart

Test:=proc(a::{vector})
print(a);
end proc;

proc (a::{vector}) print(a) end proc

(1)

Test1:=overload([ proc(a::{vector})
                  option overload;
                  print(a);
                  end proc,

                  proc(a::{Matrix})
                  option overload;
                  print(a);
                  end proc
                ])

proc () option overload; [proc (a::{vector}) option overload; print(a) end proc, proc (a::{Matrix}) option overload; print(a) end proc] end proc

(2)

Isee := proc(a)
interface(verboseproc = 3);
printf("%P", eval(a));
end proc;

proc (a) interface(verboseproc = 3); printf("%P", eval(a)) end proc

(3)

Isee(Test)

proc(a::{vector})
    print(a);
end proc

 

Isee(Test1)

proc()
    option overload;
    [proc(a::{vector}) option overload; print(a); end proc,
        proc(a::{Matrix}) option overload; print(a); end proc];
end proc

 

#with(Routines);
#

#An non overloaded procedure in a package

Isee(ConicMatrix);
#

 

                                  ConicMatrix

 

#An overloaded procecure in a package

Isee(FactReduce);
#

                                  FactReduce

 
 

 

Download 2024-08-12_print_overloaded_procedure.mw

I was looking at the application center about attractors and found the Rossler attractor app that illustrates the Rossler Attractor with animations, as you can see below. But when I try to run it on my laptop  the two last plots remain empty. Why is this happening?

Rossler Flow System - Rossler Attractor

by Yufang Hao, <yhao@student.math.uwaterloo.ca>

This worksheet contains the images of the Rossler Attractor and the animations that follow the trajectory.

restart; with(DEtools): with(plots):

Warning, the name changecoords has been redefined

 

The Rossler attractor is defined by a set of three Differential equations:

x' = -(y+z)

y' = x+a*y

z' = b + x*z - c*z

where the coefficients a, b, and c are adjustable constants.

rosslerEqns := [
diff(x(t),t) = -(y(t)+z(t)),
diff(y(t),t) = x(t) + a*y(t),
diff(z(t),t) = b + x(t)*z(t) - c*z(t) ];

rosslerEqns := [diff(x(t), t) = -y(t)-z(t), diff(y(t), t) = x(t)+a*y(t), diff(z(t), t) = b+x(t)*z(t)-c*z(t)]

(1)

a:=0.17: b:=0.4: c:=8.5:
DEplot3d(rosslerEqns, {x(t),y(t),z(t)}, t=0..300,
         [[x(0)=0, y(0)=0, z(0)=0]],
         x =-15..15, y=-15..15,z=-5..25,
         stepsize=0.05, linecolour=1+sin(t*Pi/3)/2,
         thickness=1, orientation = [-110,71]);

 

a:=0.17: b:=0.4: c:=8.5:
display(
  [seq(
    DEplot3d(rosslerEqns, {x(t),y(t),z(t)}, t=0..4*i,
         [[x(0)=0, y(0)=0, z(0)=0]],
         x =-15..15, y=-15..15,z=-5..25,
         stepsize=0.05, linecolour=1+sin((i-t)*Pi/5)/2,
         thickness=2, orientation = [-110,71]),
    i=1..25) # end seq
  ], # end DEplot3d list
insequence=true);

 

a:=0.17: b:=0.4: c:=8.5:
display(
  [seq(
    DEplot3d(rosslerEqns, {x(t),y(t),z(t)}, t=0..4*i,
         [[x(0)=0, y(0)=0, z(0)=0]],
         x =-15..15, y=-15..15,z=-5..25,
         stepsize=0.05, linecolour=1+sin((i-t)*Pi/5)/2,
         thickness=2, orientation = [-110,71]),
    i=1..25) # end seq
  ], # end DEplot3d list
insequence=true);

 

 

 

 


 

Download rossler_attractor.mws

Good morning, please help me with 2 questions I have:

1) Maple gives me the result in radians and I want it in degrees, example:

evalf(17*sin(34)/sin(115)) = 9.513506993

The result in degrees should be 10.48901874

2) How do I transform degrees into degrees, minutes and seconds?

Example: 15.925º

= 15º 55' 30''

when i do the convert in maple to latex  is do but not fully simplify and some kind of clearer must write for paper and i must do this case by case by hand but how i can simplify before i convert to latex and remove all extra thing like multiply between two squar root


 

restart

K := [A[1] = 0, A[0] = 0, B[1] = `&-+`(sqrt(2)*sqrt(a[5])/sqrt(a[4])), k = k, a[2] = -a[5], w = -2*a[5]*a[3]*(4*k^2-1)/(3*a[4]), a[1] = 8*a[5]*a[3]/(3*a[4]), v = 2*a[1]*k]

[A[1] = 0, A[0] = 0, B[1] = `&-+`(2^(1/2)*a[5]^(1/2)/a[4]^(1/2)), k = k, a[2] = -a[5], w = -(2/3)*a[5]*a[3]*(4*k^2-1)/a[4], a[1] = (8/3)*a[5]*a[3]/a[4], v = 2*a[1]*k]

(1)

latex(K)

\left[A_{1} = 0, A_{0} = 0, B_{1} =
\mp \frac{\sqrt{2}\, \sqrt{a_{5}}}{\sqrt{a_{4}}}, k = k, a_{2} =
-a_{5}, w = -\frac{2 a_{5} a_{3} \left(4 k^{2}-1\right)}{3 a_{4}},
a_{1} = \frac{8 a_{5} a_{3}}{3 a_{4}}, v = 2 a_{1} k\right]

 

NULL


 

Download K.mw

In this post about a vibrating T-shaped structure, the ends of the T are traced over time.
The trace of the end encircled below in yellow fades with time

How to do the same with Maple? For example, can an attractor be animated this way?

restart;
_local(D, O);
with(Student:-MultivariateCalculus);
A := [0, 0, 0];
B := [a, 0, 0];
C := [a, b, 0];
D := [0, b, 0];
S := [0, 0, h];
O := [x, y, z];
lineSC := Line(S, C);
lineSD := Line(S, D);
H := Projection(A, lineSC);
K := Projection(A, lineSD);
OH := H - O;
OK := K - O;
OC := C - O;
M := Matrix([OH, OK, OC]);
O := eval(O, %);
simplify(Distance(O, H));
                               O

Error, invalid input: eval received Matrix(3, 3, {(1, 1) = -x+h^2*a/(a^2+b^2+h^2), (1, 2) = -y+h^2*b/(a^2+b^2+h^2), (1, 3) = -z+h*(a^2+b^2)/(a^2+b^2+h^2), (2, 1) = -x, (2, 2) = -y+h^2*b/(b^2+h^2), (2, 3) = -z+h*b^2/(b^2+h^2), (3, 1) = -x+a, (3, 2) = -y+b, (3, 3) = -z}), which is not valid for its 2nd argument, eqns
How to correct this error ? Thank you.

First 8 9 10 11 12 13 14 Last Page 10 of 2354