zenterix

400 Reputation

5 Badges

2 years, 363 days

MaplePrimes Activity


These are questions asked by zenterix

I am creating a Maple Document, and I would like to separate the document into sections.

One way that looks like what I could use is what I see in parts of the documentation, as below

So here the document looks like an outline.

How is this actually done?

Are there other ways of doing something like this?

Why does the code below work when I use a standalone "assume" statement but not "assuming"?

That is, why don't the first two attempts at calculating the limit use the assumption contained in those statements, ie why don't those statements return infinity and not a signum like the last attempt at the limit?

`ω__b` := proc (alpha) options operator, arrow; `ω__0`*sqrt(1+alpha+sqrt(alpha+alpha^2)) end proc

proc (alpha) options operator, arrow; omega__0*sqrt(1+alpha+sqrt(alpha+alpha^2)) end proc

(1)

`assuming`([limit(`ω__b`(alpha), alpha = infinity)], [`ω__0`::positive]) = signum(omega__0)*infinityNULL

`assuming`([limit(`ω__b`(alpha), alpha = infinity)], [`ω__0` > 0]) = signum(omega__0)*infinityNULL

NULL

assume(`ω__0` > 0)

limit(`ω__b`(alpha), alpha = infinity) = infinityNULL

NULL

Download assuming.mw

I'd like to simplify the simple expression below by dividing numerator and denominator by m_1 to obtain an expression only containing alpha.

Maple doesn't not generate the desired result.

Is there a way to do this?

expr := sqrt(-(-m__1-m__2+sqrt(m__2*(m__1+m__2)))*`ω__0`^2/m__1)

(-(-m__1-m__2+(m__2*(m__1+m__2))^(1/2))*omega__0^2/m__1)^(1/2)

(1)

simplify(expr, {m__2/m__1 = alpha})

(omega__0^2*(alpha*m__1+m__1-(m__1^2*alpha*(alpha+1))^(1/2))/m__1)^(1/2)

(2)

NULL


Download simplify_side.mw

In the code below, expr is a variable that is a vector times a cosine. Maple performs the multiplication of the vector times the scalar and writes it all as a single vector.

For didactical purposes, I wish for Maple to write out the vector times the cosine, without putting the cosine in the vector.

How is this accomplished?

v := `<,>`(`<|>`(a), `<|>`(b))

Matrix(%id = 36893488152047505644)

(1)

expr := v*cos(t*theta+phi)

Matrix(%id = 36893488152047493236)

(2)

expr := 'v'*cos(t*theta+phi)

v*cos(t*theta+phi)

(3)

NULL

Download expr.mw

I created the following worksheet to illustrate my question.

restart

We have two equations. w and w__0 are parameters and we wish to solve for A__1 and A__2.

eq1 := A__1*(w^2-3*w__0^2)+A__2*w__0^2 = 0 = A__1*(w^2-3*w__0^2)+A__2*w__0^2 = 0NULL

eq2 := A__1*w__0^2+A__2*(w^2-w__0^2) = 0 = A__1*w__0^2+A__2*(w^2-w__0^2) = 0NULL

solve({eq1, eq2}, {A__1, A__2}) = {A__1 = 0, A__2 = 0}NULL

 

Maple says the only solution is the trivial solution.

If we check the determinant of the matrix of the system we see it can be zero for certain values of w given w__0.

M := Matrix([[w^2-3*w__0^2, w__0^2], [w__0^2, w^2-w__0^2]]) = Matrix(%id = 36893488152149895276)NULL

d := LinearAlgebra:-Determinant(M) = w^4-4*w^2*w__0^2+2*w__0^4NULL

solutions := solve(d = 0, w)

(2+2^(1/2))^(1/2)*w__0, -(2+2^(1/2))^(1/2)*w__0, (2-2^(1/2))^(1/2)*w__0, -(2-2^(1/2))^(1/2)*w__0

(1)

If w is one of these values then the system of equations is singular and has non-zero solutions.``

 

For example, subbing the first value above into the equations and solving Maple gives us non-trivial solutions.

 

solve({subs(w = solutions[1], eq1), subs(w = solutions[1], eq2)}, {A__1, A__2})

{A__1 = -(1+2^(1/2))*A__2, A__2 = A__2}

(2)

``

Why didn't Maple give us any indication that there could be non-zero solutions in the first call to solve?


For context, the system of equations comes from a calculation involving coupled oscillators.

I had a system of differential equations, guessed at a solution, plugged it in and got the equations shown in the worksheet. The guess isn't a correct solution in general, but it is a solution if w is one of the values computed in the worksheet (the values of the variable "solutions").

Download solve-nonzero-solutions.mw

1 2 3 4 5 6 7 Last Page 2 of 20