Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

What's the correct way of copying the current contents of a mutable object to a variable.

Apparently eval doesn't do the job.

aVectorList := [Vector(2, [1, 2]), Vector(2, [3, 2])]

[Vector[column](%id = 36893489518525866940), Vector[column](%id = 36893489518525867060)]

(1)

results := []

[]

(2)

AddVector := Vector(4)NULL

Vector[column](%id = 36893489518525846460)

(3)

for x in aVectorList do AddVector[1] := x[1]; AddVector[2] := x[2]; results := [op(results), AddVector] end do

AddVector[1] := 1

 

AddVector[2] := 2

 

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

 

AddVector[1] := 3

 

AddVector[2] := 2

 

[Vector[column](%id = 36893489518525846460), Vector[column](%id = 36893489518525846460)]

(4)

NULL

results := []

[]

(5)

AddVector := Vector(4)NULL

Vector[column](%id = 36893489518525840668)

(6)

NULL

for x in aVectorList do AddVector[1] := eval(x[1]); AddVector[2] := eval(x[2]); results := [op(results), AddVector] end do

AddVector[1] := 1

 

AddVector[2] := 2

 

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

 

AddVector[1] := 3

 

AddVector[2] := 2

 

[Vector[column](%id = 36893489518525840668), Vector[column](%id = 36893489518525840668)]

(7)

NULL

Download Mutable.mw

the error in summation , How can this be corrected?

restart;

U[0] := x^2;

for k from 0 to 1 do U[k+1] := sum(U[s]*(diff(U[k-s], x)), s = 0 .. k) end do;
U[0]*(diff(U[0], x));
                                 3
                              2 x 
U[1];
                               0

Dear all,

The November issue of Maple Transactions is now up (we will be adding a few more items to that issue over the course of the month).  See https://mapletransactions.org/index.php/maple/index for the articles.

More importantly, Maple Primes seems to have a great many interesting posts, some of which could well be worked up into a paper (or a video).  Maple Transactions accepts worksheets (documents, workbooks) for publication, as well, although we want a high standard of readability for that.  I invite you to contribute.

The next issue of Maple Transactions will be the Special Issue that is the Proceedings of the Maple Conference 2021 (see my previous post :)

-r

simplified_MPH_to_RPM_to_engineering_units.mw

Good Morning,

I don't know why I have such difficulties with rotational units, esp the 2*pi conversions with radians and revolutions. 

   We are often back solving from MPH of the vehicle back to RPM of the wheel (revolutions per minute [or seconds]) to Rad/sec for engineering units such as torque*RPM calcs for power - kW.   

Almost everytime I try to use units to convert the units the worksheet will revert to "atomic" units.   I quote "atomic" as this is what I appears to be.:  See graphic (also simplifiied worksheet attached)

The unit length(radius) seems to be a factor that is not well documented.   It also seems the earlier rplies include extra work to use convert and possibly "symbolic = true") as an extra step per Acer in an earlier posting several years ago.   

When running calcs the convert, or simplify (to cancel length units m and inches out) the cancelations and the unit combinations seem to work awkwardly in this particular area.



 

 

Let  

f := beta/(2*sigma*GAMMA(1/beta))*exp(-(abs(x-mu)/sigma)^beta);

where mu::real, beta > 0, sigma > 0.
How can we obtain the expression of F?

F := int(f, x=-infinity..s)


Reverse problem (a priori simpler):
It's known that 

F := 1/2+signum(x-mu)/(2*GAMMA(1/beta))*(GAMMA(1/beta)-GAMMA(1/beta, abs((x-mu)/sigma)^beta))

How can we check that diff(F, x)=f?
Even with the assumptions on beta, mu and sigma and additional assumptions x>0 or x<0, I can't verify that diff(F, x)=f.

 

Hello, dear members! I try to solve the 1-D Wave Equation with initial and boundary conditions. And I have a problem when I'm trying to find the coeffs of Fourier series, that they depend on initial conditions. This is my code for Maple:
 

restart;
with(PDETools);

# set the PDE, ic(initial conds) and bc (boundary conds)
pde := diff(u(x, t), t, t) = a^2*diff(u(x, t), x, x);
ic := u(x, 0) = 0, D[2](u)(x, 0) = psi(x);
bc := u(0, t) = 0, u(l, t) = 0;
psi := piecewise(0 <= x and x <= l/2, x, l/2 <= x and x <= l, l - x);

# using Fourier method for solving (I require use this methods)
res := pdsolve(pde, HINT = T(t)*X(x));

ode1 := op(1, op(1, op(2, res)));

ode2 := op(2, op(1, op(2, res)));               

ode2 := subs(_c[1] = -lambda, ode2);
              

# solve 2 ODE
# equation rely X(x)
dsolve({ode2, X(0) = 0}, X(x));

sin(sqrt(lambda)*l) = 0;

solve(%, lambda, allsolutions);

lambda := (Pi*n/l)^2;

X := (x, n) -> sin(Pi*n*x/l);


# equation rely T(t)
ode1 := subs(_c[1] = -lambda, ode1);

dsolve({%, T(0) = 0}, T(t));

T := (t, n) -> C1[n]*sin(Pi*n*a*t/l);

# write the general solutions
Un := (x, t, n) -> T(t, n)*X(x, n);

# find the coeffs series
simplify(subs(t = 0, diff(u(x, t), t)) = psi);

((2/l)*l/(Pi*n*a)*int(psi*X(x, n), x = 0 .. l) assuming (x < l))
simplify(%) assuming n::posint;
combine(%);
C1[n] := factor(%)

But I got it:



How to find this C1 coefficient and solve this equation? Maple doesn't work now. This command does not give the result.
I attached mws files, so pdeLR_11.mw is another code for solving, but it is not working so((! 

Maybe I use this command wrong, or step-function is not convenient for maple?

Any helpful advice would be very cool. I am grateful in advance!

https://drive.google.com/file/d/1VznAvxcpF3ME9MMBjfKKifsbrbOb9uSY/view?usp=sharing

https://drive.google.com/file/d/15D7BCRwHliYb2OseH81i81RjQP7NRFgS/view?usp=sharing

 

I know that the "rotate" can rotate image of a function, but we see that the coordinate axes don't change as much. For example:

with(plots):
with(plottools):
p:=plot(sin(x),x=0..2*Pi):
r := rotate(p, Pi/4):display(p, r)

Although someone seems to have asked a similar question a long time ago, it was far from what I needed.

https://www.mapleprimes.com/questions/97812-Flip-Plot-Exchange-X-And-Yaxes

What I want to do is rotate the axes and the image at the same time rather than just flip axes.  The schematic diagram is as follows.

How can the value of uu(.1, .1, .1)  as a number, and what is the error when drawing?

restart;
uu := proc (x, y, t) options operator, arrow; e^(.2*t)*(e^(-x)+e^(-y)) end proc;

evalf(uu(.1, .1, .1));
                              2.  
                             -----
                              0.08
                             e    
plot3d(uu(x, y, .1), x = 1 .. 2, y = 1 .. 2);
Warning, expecting only range variables [x, y] in expression e^.2e-1*(e^(-x)+e^(-y)) to be plotted but found name e

I have a pair of vectors, one containing x values, and the other containing the corresponding y values.

I plot them using: plot(x_vector, y_vector)

If I have another pair of vectors, x2_vector and y2_vector.

How to I plot them on the same graph so that I can compare them?

Recently I have wanted to add some questions/answers to "Favourites" . I added some posts a few years ago. Now I can't figure out how do do it. A good example is this evenings question on setting up a library. How to install a library on Maple? - MaplePrimes

The answer has useful links. And this is a particular topic I tend to have difficulty with.

On a Windows machine, I want to install a library in Maple? 

Could you please help me?

Thank you in advance.

Sincerely yours

Dear Collaboratory, as a former mathcad user I am trying to transfer slowly towards Maple. In the attached file I have a problem in solving the ODE numerical. I would appreciate it if someone would be willing to help me out. I tried to upload my maple file but I am not sure it is attached.

Hi,

I am trying to integrate a function from -infinity to infinity.  When I enter the integrate command into Maple, I just get the command back.  Does anyone know how to properly code the command for an indefinite integral?

I have attached the relevant worksheet.Indefinite_Integral.mw

When converting a list which includes lists to a set, duplicate entries are dropped.

However converting a list with vectors to a set, no duplicate entries are dropped.

Any explanation to that behaviour?

a := {Vector(2, [1, 0]), Vector(2, [2, 0])}

{Vector[column](%id = 36893490347685388884), Vector[column](%id = 36893490347685389004)}

(1)

b := [Vector(2, [1, 0]), Vector(2, [2, 0]), Vector(2, [1, 0])]

[Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)]

(2)

c := convert(b, set)

{Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)}

(3)

d := [[1, 0], [2, 0], [1, 0]]``

[[1, 0], [2, 0], [1, 0]]

(4)

e := convert(d, set)

{[1, 0], [2, 0]}

(5)

``

Download DuplicateEntries.mw

Hi,

Please can you give me a hand with numerical solving and visualising the integral equation with stochastic term B(t), using quadrature method ?

I had a look at the "stochastic" package by Sasha Cyganowski

Look forward to your help.

Thanks,

nada

First 7 8 9 10 11 12 13 Last Page 9 of 1863