Maple 2016 Questions and Posts

These are Posts and Questions associated with the product, Maple 2016

I have a coupled pair of anharmonic oscillators and need to calculate the stability matrix and find the lyaupanov exponent for how the nearby trajectories diverge. In particular, I have the Hamiltonian

H = (p1^2+p2^2 + q1^4+q2^4 + 12*q1^2*q2^2 )/2

and I need to compute the matrix M given by

dM/dt = J*Hess*M

where J := Matrix(4,4,[0,0,1,0,  0,0,0,1,  -1,0,0,0,  0,-1,0,0]), and the Hessian takes the form:

Matrix(4,4, [6*q1_12(t)^2 + 12*Q2_12(t)^2, 2*12*Q1_12(t)*Q2_12(t),0,0,   2*12*Q1_12(t)*Q2_12(t), 6*Q2_12(t)^2 + 12*q1_12(t)^2,0,0,    0,0,1,0,    0,0,0,1])

The solver finds the trajectories of p1,p2,q1,q2 fine, but I don't seem to find a way to incorporate their solutions as inputs to reevaluate the Hessian at each time step. I read through https://www.maplesoft.com/support/help/Maple/view.aspx?path=DEtools%2fmatrixDE and the dsolve since I'm trying to do this numerically.

I thought I could get around this just by resolving the trajectories, but it's spitting out an error that arrays must be initialized with lists.

The actual code is here: AMO_HW4.mw

Sorry, I still need to clean it up a bit. Any help would be appreciated. I need to calculate M(t), then calculate the matrix norm and find the exponent.

 

 

 

 

How do i plot

in one plot with this paraellogram (it has to come out of the center of it)

test_sections.mw

Hi, I'm getting some unusual behaviour between the Explore() command / graphs and collapsed sections, as exemplified in the attached (linked) worksheet.  I'm trying to develop some worksheets with several sections where some of the sections have an explore() graph in them.  To keep things simple, I'd like some sections to be collapsed with the graphs hidden (and remain collapsed: View - Section - Autoexpanding - Uncheck) when the worksheet is evaluated.  In the attached, the section remains collapsed, so does the normal graph, but the explore "graph" gets published outside the collapsed section and when there is other information on the worksheet, the explore window appears almost randomly.

So is there any way to ensure the explore graph remains inside the collapsed section?

Sorry for the slightly longwinded explanation :-)

Thanks,

So I needed a CAS, and I spent a couple of months trying to get a basic understanding of SymPy and various applications starting with "M". We have Maple version 2016.

My "prototype problem" can be solved by hand, and is a system of quadratic Bellman equations, for i=1,2.  I'll return to it below, as I am obviously too clumsy to get even the second-to-simplest max/min working.  Oh, and I can't even insert Maple Math here in the forum, it does not like maximize or minimize.

Let's start easy. I enter
maximize((b-x)x,x) 
which works as I expect. Then already at
maximize((abs(b)-x)x,x>=0) 
I am stuck. Please, sweet Maple, you know that the answer is the same as before, don't you? (In the meantime I have tried to feed it maximize((b-x)x,x=0..1)... )

I was hoping my "proper" problem should be doable. What I really need is a sequence of quadratic optimization problems, where I have a vector x maximizing b'x-x'Ax subject to linear constraints, so it should not be too hard.  The "prototype problem" I needed for starters, is a system where for i=1,2 I have 

v_i(0,y)=0 and inductively v_i(t+1,y)=max{x_i*(b_i-x_1-x_2)+ r_i v_i(t,y-x)}

where b_i and r_i are constants, x=(x_1,x_2), y=(y_1,y_2), and everything is nonnegative - including, the choice variables x_i must be between 0 and min{y_i, b_i-x_1-x_2}. And I want to plot both functions and the x with time as a slider, but ... I don't think I'll ever get that far? 

Sorry for whining. (I know why I dropped out of computer science.)

This is my first post here, and any help is really appreciated.

I have two complex polynomials 

f(w)= w^8+w^6+4*w^4+w^2+1 , and 

g(w)= w^16+2*w^14+9*w^12-2*w^10+44*w^8-2*w^6+9*w^4+2*w^2+1 .

I want to plot the roots of f in blue, roots of g in red and a unit circle in black at the same picture. 

Thanks in advance for your help.

Good day, I have an assignment in which I'm required to plot the solid that results from the cone (x^2+y^2-z^2=0), limited by the planes z=0 and x+2z=3. So far I've been trying to use plot3d and implicitplot3d, to no avail: the parametric expression from plot3d returns something quite different from the intented, and implicitplot3d won't allow the use of variable parameters.

Any ideas on how to solve this?

Hi everyone.    How i can introduce an acximetric tolerance?. For example +10/-5. Thanks!

This solve command produces both unconditional and conditional solutions.

Is there a way to have it only output unconditional solutions, or, failing that, is there a way to select the unconditional solutions from its output?

solve({2*x+y+z = 3, x^2+y^2+z^2 = 3}, [x, y, z], real, parametric)

I would like to solve {x^2+y^2+z^2 = 3, x+y+z = 3} over the reals. Clearly x=1,y=1,z=1 is a solution.

Maple seems to have a hard time with this. I have tried using with(RealDomain) and various commands.

The last solution  is getting closer to the real number answer if i substitute z = 1, but then i get the strange answer { 1=1, x=1,y=1}

I tried using wolfram and it showed me the correct answer.

Rest assured, I am a strong maple fan. I sometimes use wolfram for quick and dirty solutions.

Also is there a way to turn off "with(RealDomain)", switch back to the default domain, without using 'restart'. 

I am using the LinearAlgebra package to do dynamics between a rotating Cartesian coordinate system and a fixed Cartesian coordinate system. The VectorCalculus package is not what I need. 

Since I can't seem to get my test worksheet to paste into this post, I will manually enter an "approximation" to it. I assume that the notation [x, y, z] represents a column vector. I also assume that x represents the cross product operator from the operator pallete. 

I just want to get any one of the three ways of doing a vector cross product (see below) to simply display in math notation as R x V. What I get from the three methods below for an unevaluated cross product is "ugly".

Any help or advice will be greatly appreciated.

> restart

> with(LinearAlgebra):

> R := Vector(3, [x, y, z])

                                                 R := [x, y, z]

> V := Vector(3, [u, v, w])

                                                 V := [u, v, w]

>R x V

                                                [-vz + wy, uz - wx, -uy + vx]

>'R x V'

                                               Typesetting:-delayCrossProduct(R,V)

>CrossProduct(R, V)

                                               [-vz + wy, uz - wx, -uy + vx]

>'CrossProduct(R,V)'

                                               LinearAlgebra:-CrossProduct(R,V)

> R &x V

                                               [-vz + wy, uz - wx, -uy + vx]

'R &x V'

                                               LinearAlgebra:-&x(R,V)

When I download the help document here

https://www.maplesoft.com/support/help/maple/view.aspx?path=int%2Fdetails

I get a bug when I execute the page.

I copied pasted the last line using 1d math notation to replicate the error.

There is no addition symbol between x^2 + O(x^5)

On the help page I don't see an error. 

 I uploaded the help file   int-details_(2).mw 

Hello people in mapleprimes,

I hope you will help me about modifying an expression.

How can I factor the expression with w and Delta__1 in the attached file?

e2_3 := w^(1-sigma)*((f__11*sigma*Delta__1/L__1)^(-1/(sigma-1))/w)^(k-sigma+1)*k/(Delta__1*(k-sigma+1)*a__0^k);

Thank you for advance.

Modifying_expression_factor.mw

The linked worksheet displays the geodesic between two points on a surface z(x,y).

Surfacepath.mw

Gradient descent will find a stepped approximate path of fastest descent between the points, but is there a way to find a function defining an exact i.e. smooth path of fastest descent? If so, how can a precise time of fastest descent be determined?

The following procedure describes the path of a projectile fired from the origin with a launch angle of alpha and a launch velocity of u.

z := proc (x) options operator, arrow; tan(alpha)*x-(1/2)*g*x^2/(u^2*cos(alpha)^2) end proc

The projectile's path must pass through the point [a, h], both values greater than zero.

Can an expression be found for the minimum value of u and its related value for alpha?

Hi, I am currently using the embedded components to make an interface in maple 2016. However, when I executed the startup code, an error was reported, which is 0, "recursive assignment". The recursions are not allowed in the startup code? Anyone can help me with this problem? By the way, how to cancel the warning of executing the startup code when I open the .mw?

Many thanks!

First 18 19 20 21 22 23 24 Last Page 20 of 60