Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello,

I use Maple and Maple Flow and want to work with physical units. However, I am quickly reaching the limits of what is possible. Now the question: Would it be possible to work with units and the piecewise function? In the attached example, the integration of a defined function is no longer possible. Or should I proceed differently in principle? Many thanks for any advice

Clemens

restart

 

Definition of current functions

"`i__1`(t):={[[0&lobrk;A&robrk;,t<0.01&lobrk;s&robrk;],[3&lobrk;A&robrk;*cos((2*Pi*t)/(T)),t>=0.01&lobrk;s&robrk;]]:"

"`i__2`(t):=3&lobrk;A&robrk;*cos((2*Pi*t)/(T)):"

"`i__3`(t):={[[0,t<0.01],[3*cos((2*Pi*t)/(`T__3`)),t>=0.01]]:"

T := 0.2e-1*Unit('s')

plot([i__1(t), i__2(t)], t = 0 .. .1*Unit('s'), color = [blue, red], legend = [i__1, i__2])

 

Calculation of RMS values

RMS__1 := sqrt((int(i__1(t)^2, t = 0 .. T))/T)

Error, (in Tools:-IntegrateExpression) units problem, can't make expression piecewise(t < .1e-1*Units:-Unit(s),0,.1e-1*Units:-Unit(s) <= t,3*Units:-Unit(A)*cos(314.1592654*t/Units:-Unit(s)))^2 unit-free with units [t::Units:-Unit(s)]

 

RMS__2 := sqrt((int(i__2(t)^2, t = 0 .. T))/T)

2.121320344*(Units:-Unit(A^2*s)/Units:-Unit(s))^(1/2)

(1)

and now without Units

T__3 := 0.2e-1

RMS__3 := sqrt((int(i__3(t)^2, t = 0 .. T__3))/T__3)

1.500000000

(2)

Download UnitProblem.mw

It seems to me that Draghilev's method can be applied quite successfully to the solution of Diophantine equations. Here is a simple example where we find two solutions at the intersection line of two ellipsoids:
  x1^2-x1*x2+x2^2+x2*x3+x3^2-961=0;
  (x1-3)^2+10*x2^2+x3^2-900=0;

Solutions: (11, -4, -26) and (10, 1, 29).

 


Based on the text of the program, it is possible to solve various examples with Diophantine equations.
3d_1.mw

Explanations.
f3 is an auxiliary equation for finding the starting point, NPar is a procedure that implements the Draghilev method, the red color of the text is the place where the integer values of the points on the integral curve are filtered.

 Can be compared with the solution of the
isolve function
 

 restart:
  f1 := x1^2-x1*x2+x2^2+x2*x3+x3^2-961;
  f2 := (x1-3)^2+10*x2^2+x3^2-900;
  isolve({f1, f2})

 

Hi, so I'm trying to solve this equation, but it seems that I've ran into two issues with it:

My problems with this this is such:

  • The pi^2 did not get integrated into the solution, it's just a pi^2. I would rather it not be like that, but the actual resulting number from that division
  • The units should result in Ω, but it's not, instead it just added the units from the original variables. How do I make it set to the "correct" unit?

LLC_converter.mw

Dear all

I construct by hand the two matrices L and U so that A= LU ( LU-factorization) 
I would like to find the number of arithmetic operations required to obtain the matrices 𝐿 and 𝑈

Number_arithmetic_operation.mw

Thank you

in some cases, when integral returns result with special function in it, I want to keep the integral as inert instead.

Currently I do an explicit check for some special functions that could show up (and add more if needed). like this

anti := timelimit(60,-int(B/A, x));
if  has(anti,hypergeom) 
               or has(anti,MeijerG) or has(anti,WhittakerM) 
               or has(anti,WhittakerW)or has(anti,EllipticE) or has(anti,EllipticF) then                            
   anti := -Int(B/A, x);
 fi;

It will be nice if I could write

anti := timelimit(60,-int(B/A, x));
if hastype(anti,'special_math_function') then                  
   anti := -Int(B/A, x);
fi;

Function advisor knows about all elementary functions in maple

FunctionAdvisor( elementary );
The 26 functions in the "elementary" class are:

 [arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, 

   arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, 

   coth, csc, csch, exp, ln, sec, sech, sin, sinh, tan, tanh]


Is there a way to make a type in Maple for "special math functions"?  You might ask, what is a special math function. Well, it is all build in math functions in Maple which are not elementary? So I do not have to list them all in name one by one as there are so many of them.

Any suggestions?

Maple 2022.2.

I have not used _Envsignum0 before. Been looking at it, and I am little confused.

My testcase is the following

restart;

_Envsignum0:=1;
fy:=1/2*(a^2/y^2+2*a*b/y-4*a*c/y+b^2-4*b*c+4*c^2+2*a)^(1/2);
limit(diff(y*fy,y),y = 0,right) assuming real;

It still has signum there., I assumed all are real.

Is there a setting that will automatically convert all signum to 1?  as _Envsignum0:=1; does not seem to do it. Or do I have to explicitly add positive each time? as in

restart;
_Envsignum0:=1;
fy:=1/2*(a^2/y^2+2*a*b/y-4*a*c/y+b^2-4*b*c+4*c^2+2*a)^(1/2);
limit(diff(y*fy,y),y = 0,right) assuming real,positive;

The problem with adding assuming real,positive is that it applies to all variables in the expression. I only wanted those that has signum on them, to be replaced by 1.

Maple 2022.2 windows 10

Dear All

Same calculation, but Maple gave 2 different results, when I used 2 different input methods, using palettes and through Maple Tutors, respectively (image). Can someone explain to me the reason?

Dear everyone.

Please suggest me how to choose a suitable function (g(x)) so that the convergence property of the following improper integral can be checked by the comparison method:

Hi,

I just started to try out maple, as I'm testing out some software. So far it's been fairly easy to work in. I have ran into this interesting solution however

The issue I'm having is that the solution should not be... whatever that is. It should result in, off the top of my head, 2 or 4 numbers, and I'm only interested in one of them. None of the above is the answer to my question however. I don't know exacty what I'm supposed to do to get to that point. looking up the "RootOf" part on the support page didn't really explain it all that well.

Dear all 
I have Sol=proc(  )
local .... ;
RES:=vector with size fixed 
for k from 1 to 100  # iteration
a:=..
if a < 0.1 then 
break;
end if ;
RES[k]:=a;
end do;
print(RES);
 end proc;

My questions:
1) How can I define the vector RES with no size fixed ( we can not at the begin fix the size of RES)
2) Then how can I plot this vector versus number of iteration  
Thank you

Any chance to have "Evaluate->Remove Output From Worksheet" become active and usable when one is still running something in the worksheet?  May be in 2023 version?

This is something that has been missing in Maple for ages.

Maple definitely slows down when the worksheet becomes full of output (from print messages) when a command has been running for long time. Now there is no way to remove the output in the worksheet until the command completes which can take hours. May be this slow down because the scrolling/writing to the worksheet slows down, and this affects how long it takes to complete as the engine is waiting for the frontend to finish writing to the worksheet?. I do not know. I just know Maple slows down when this happens.

I do not understand why Maple can't implement this. Is there a tehnical reson which will make removing current output in the worksheet not possible while a command is running?

We have just released the 2022.2 updates for Maple and MapleSim. These updates are freely available to all customers who have the 2022 version of these products.

Maple 2022.2 includes improvements to worksheet performance, the math engine, and more. As always, we recommend that all Maple 2022 users install this update. It is available through Tools>Check for Updates in Maple, and is also available from our website on the  Maple 2022.2 download page, where you can also find more details.

The MapleSim 2022.2 family of products offers an enhanced user experience through an expansion of the modeling libraries, a range of new productivity features, and several new options requested by users. See the MapleSim 2022.2 update page for details on new features, and for instruction on how to obtain your update.

How to find the dispersion relation (3) in Maple? I try it by equating the coefficients of cos(kx + wt) and its derivative to zero, but couldn't find it.

restart

with(LinearAlgebra):

alias(E = E(x, t), P = P(x, t), N = N(x, t), Q = Q(x, t));

E, P, N, Q

(1)

d := Matrix([[c*(diff(E, t))+diff(E, x), alpha*P, 0, 0], [N[0]*E, diff(P, t), -sigma[2]*Q[0]*N/N[0], sigma[2]*omega[0]*Q], [0, sigma[1]*sigma[2]*Q[0]*P/N[0], diff(N, t), 0], [0, -omega[0]*P, 0, diff(Q, t)]]) = 0

d := (Matrix(4, 4, {(1, 1) = c*(diff(E(x, t), t))+diff(E(x, t), x), (1, 2) = alpha*P(x, t), (1, 3) = 0, (1, 4) = 0, (2, 1) = N(x, t)[0]*E(x, t), (2, 2) = diff(P(x, t), t), (2, 3) = -sigma[2]*Q(x, t)[0]*N(x, t)/N(x, t)[0], (2, 4) = sigma[2]*omega[0]*Q(x, t), (3, 1) = 0, (3, 2) = sigma[1]*sigma[2]*Q(x, t)[0]*P(x, t)/N(x, t)[0], (3, 3) = diff(N(x, t), t), (3, 4) = 0, (4, 1) = 0, (4, 2) = -omega[0]*P(x, t), (4, 3) = 0, (4, 4) = diff(Q(x, t), t)})) = 0

(2)

re := -c*omega^3-kappa*omega^2+(c*omega[0]*(N[0]^2*sigma[2]+Q[0]^2*sigma[1])/N[0]^2-alpha*N[0])*omega+kappa*omega[0]*(N[0]^2*sigma[2]+Q[0]^2*sigma[1])/N[0]^2 = 0;

-c*omega^3-kappa*omega^2+(c*omega[0]*(Q[0]^2*sigma[1]+N[0]^2*sigma[2])/N[0]^2-alpha*N[0])*omega+kappa*omega[0]*(Q[0]^2*sigma[1]+N[0]^2*sigma[2])/N[0]^2 = 0

(3)

``

``

Download d_relation.mw

Hi everyone 

I have a problem regarding the animation of a flying ball. 

I get the coordinates and rotation in rad/s out of differential equations. Now I want to show the movement of the ball including the rotation in an animation. 

With just the coordinates it works just fine, but when I try do add the rotation the error message "number of elements in lust must be a multiple of 2" appears

I would be grateful for some advice. Thank you in advance.

I added my file, hope it helps.

how_rot.mw

Hi

My third-party soft is fussy: it will only accept pasted plaintext, with no spaces in between, for example:

1407,1411,2,1408,1409,0
1407,1408,2,1409,1411,0

#My input is 
ans1 := [1407, 1408, 2, 1409, 1411, 0], [1407, 1409, 2, 1408, 1411, 0], [1407, 1411, 2, 1408, 1409, 0];

#I am "trying" to remove the whitespace and convert it to plain text

with(StringTools):
for i to 3 do
seq(parse(DeleteSpace(convert(ans1[i][j],string))),j=1..6);
next i
od;

#But the whitespace is still there....

lprint(%%%);lprint(%%);lprint(%)
ans1 := [1407, 1408, 2, 1409, 1411, 0], 

  [1407, 1409, 2, 1408, 1411, 0], [1407, 1411, 2, 1408, 1409, 0]


                  1407, 1408, 2, 1409, 1411, 0

                  1407, 1409, 2, 1408, 1411, 0

                  1407, 1411, 2, 1408, 1409, 0

First 145 146 147 148 149 150 151 Last Page 147 of 2097