Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

When translating initial conditions, for derivatives, to Latex, the output is not easy to read, and was wondering how to make it more standard.

For example, let say initial conditions for second order ODE are [y(0)=0,D(y)(0)=3] in Maple syntax.  I convert these to Latex using

restart;
ic:=[y(0)=0,D(y)(0)=3];
Physics:-Latex(ic)

which gives

               [y \left(0\right) = 0, D\left(y \right)\left(0\right) = 3]

The problem is with derivatives. They are hard to read, unless someone knows Maple. The above renders are

I'd like to get the above to standard form 

Which more easily understood and is the standard in textbooks and papers.

This issue does not show up in Mathematica, because in Mathematica initial conditions can be entered as  {y[0]==0,y'[0]==3} and this translates directly as is

Which renders a

I know in Maple document mode, 2D math input, one can also enter the IC the same as with Mathematica, which is easier, but the Latex translation still the same as with the worksheet 1-D math.

Going back to Maple, I could enter the initial conditions instead as follows

restart;
ic:=[y(0)=0,eval(diff(y(x),x)=3,x=0)];
Physics:-Latex(ic)

And now the latex generated renders as

Which might be more understandble but too heavy weight compared to the simpler form y'(0)=3 and I remember reading that use eval() as above is not as safe as using the D(y)()... notation for initial conditions.

Are there any other tricks that would allow the latex of derivative to show in the standard form to make it easier to read?

Is it possible for Physics:-Latex to automatically detect the form D(y)(x0)=y0 and generate y'(x0)=y0 for its Latex? This will be the ideal solution. This will apply to higher derivatives as well. For example 

Physics:-Latex( (D@@2)(y)(0)=3)

Now gives

         D^{\left(2\right)}\left(y \right)\left(0\right) = 3

which renders as

While a much better output would be the standard

This will go a long way towards improving the Latex generated by Maple.

Any suggestions?

 

 

Hi!

What could be a fast procedure to cancel uncommon factors of terms in such following sets (list) and simplify:

Starting with:

{a*x,b*x, c*(x+y)}

(where a, b and c are numbers or in set of specified variables as well as x and y), I would like as a result:

{x,x+y}

 

Many thanks.

 

Jaqr

Here is my code (will attach a screenshot below with the errors, since the formatting gets wonky if I try to paste it as text)

What might be the problem here? I seem to have proc and end proc, but Maple seems to be dividing my code into two sections, and evaluating them separately

https://imgur.com/a/npbF9NG

Hello again,

I want to maximize a function u(k,x) with the following form

u := (k, x) -> (1 - theta(sP, sL))((p + sP)*q(x) - w(k)*x + sL) + theta(sP, sL)*b(k)

where theta, q, b, w have previously being defined and (sP,sL) are parameters. I want to maximize u and therefore,

with(Optimization):
Maximize(u(k, x), variables = {k, x}, k = 0 .. 1);

My question is how to tell Maple that I want my optimal solution, (k*,x*) to be expressed as a function of (sP,sL)?

 

First, I want to find the set of solutions of this system and then find the steady state vector.

I know that I can find an approximation of the steady state vector ''directly'' if I calculate Pfor big k values (one column of Pk will give me an approximation), but it's not what I want to do. I need the complete set of solutions with a free parameter.

LinearSolve() doesn't give me the set of solutions. See the picture below. Here Q is the transition matrix.

I hope my question is clear (:

Please answer the questions posed in the body of the uploaded worksheet.

The worksheet employs the command DirectSearch[SolveEquations]. Responders must establish their own connection to the DirectSearch package.

Invert_Torus.mw

When i enter  Physics:-Version() I see the output

The "Physics Updates" version "859" is installed but is not active. The active version of Physics is within the library

   C:\Program Files\Maple 2020\lib\maple.mla, created 2020,  March 4, 20:36 hours

 

I tried to install it using Maple Cloud. The installation is stuck as seen below. Also i deleted the text file in the toolbox 2020 folder, maybe in the hope of starting from scratch.
 

Can someone please explain what to do to manually add the physics update, step by step. I am not that computer savvy as some of the users appear in other posts , I did try reading some.
I tried to download the physics update manually but I keep ending up with the same maple worksheet that says you need to use maplecloud.


In case you cannot read the text in the image

Version: Maple 2020.1

When i set the color for the gridlines it only seems to be applied for the major-tick gridlines as the following trivial example shows:

plot(sin(t), t = 0 .. Pi, axes = frame, background = "#303030", color = "Orange", axis = [gridlines = [color = "#707070", linestyle = dot]])

I assume it must also be possible to also specify the color for the minor tick-marks gridlines?

The obvious (?) variant "axis=[gridlines = [color = ["#707070", "#707070"] , ... " just seems to crash maple (nothing happens when the plot() expression is evaluated).

I'm unable to find anything in the documentation regarding this and it only seems to imply that the color should be applied to both major & minor gridlines which is not the case.

?

 

 

 

 

Hi everyone! Currently I'm studying magnetism, and I was thinking that maybe seeing represented the helix movement of an atom with a vector v parallel to the Magnetic Field B subject to the Force of Lorentz and the Hysteresis cycle created in the magnetazation of a ferromagnetic material could help me understand it more. I tried to create the plots in Maple 2015 but I couldn't.. anyone can help me by creating those two plots?

I notice that when I enter ?convert or ?convertininto the maple prompt, the help window opens once and then ceases to function.

Update. It seems that the problem is not restricted to a specific command, this occurs for any command. To replicate, open help using F1, exit maple help, then open help again using F1. Maple help won't open again. I have to do a hard exit to get it to work again.

Platform details:

Hello,

Recently I switched from Mathematica to Maple. I have the following code 

solve({pf'(e)- psi'(e) - tau - mu*pi(tau)/(1 - pi(tau)) = 0}, {tau}) assuming 0 < p, 0 < tau, 0 < mu, 0 <= pi< 1

and I am getting a result of 

RootOf(-D(pf)(e)*pi(_Z) - mu*pi(_Z) + _Z*pi(_Z) + 2*pi(_Z) + D(pf)(e) - _Z - 2)

I have to questions: (a) what does that _Z means? (b) is it possible to express the above solution in a more "readable" way?

Thanks in advance

/Mrs.,

How can I plot "log scale base 2" instead of "log scale base 10" (plot "log2plot(x,x=0..10)" instead of "logplot(x,x=0..10)")? 

I would appreciate if you make me some help with this situation.

faithfully,

I am trying to apply assumptions to the solution set of an equation. I've tried assume and assuming (see attached) to no avail. What am I missing? How can I achieve this?assume.mw
 

`assuming`([solve(x^2-x-2 = 0, x)], [x > 0])

2, -1

(1)

assume(x > 0)

solve(x^2-x-2 = 0, x)

2, -1

(2)

``


 

Download assume.mw

 

I am generating splines using CurveFitting[Spline] command, which produces piecewise functions. I would like to extract the different "pieces" of the spline for use elsewhere. How do I do that? In the attached worksheet, for example, I would like to extract (59*x^2)/756, -1/84*x^2 + 17/63*x - 17/84, and -19/504*x^2 + 19/36*x - 61/72. There has to be a way to do this, but I'm coming up short.

spline.mw
 

with(CurveFitting)

f := Spline([[0, 0], [3, 1/2], [7, 1]], x, degree = 2)

piecewise(x < 3/2, (59/756)*x^2, x < 5, -(1/84)*x^2+(17/63)*x-17/84, -(19/504)*x^2+(19/36)*x-61/72)

(1)

``


 

Download spline.mw

 

I want to plot some oscillating function (function involve sin and cos) as a function to time (t). And when I try a large interval like t=0..1000, it is going to take forever to plot the graph and the system becomes a little laggy. Is there any way I can do to make it compute quickly?

Thank you all

First 357 358 359 360 361 362 363 Last Page 359 of 2097