Maple 2018 Questions and Posts

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

I am developing an algorythm which returns some differential equation, which I want to simplify. Here is an example:

eqq:= k[t]*(`ℓ`^2)*(diff(q[3](tau), tau, tau)+(5*alpha-sigma+2*theta+1)*q[3](tau)+(-4*alpha+sigma-theta)*q[2](tau)+q[1](tau)*alpha) = -(sqrt(m*(1/k[t]))*`ℓ`*k[t]*`Δθ`*(q[3](tau)-q[2](tau))*sin(sqrt(Lambda*k[t]*(1/m))*sqrt(m*(1/k[t]))*tau)+2*xi*sqrt(lambda*k[t]*m)*(diff(q[3](tau), tau)))*`ℓ`*(1/sqrt(m*(1/k[t])))

I want the parameters to be associated to the the variables, q[1](tau)q[2](tau)q[3](tau) and their derivattives. So, I have used "collect" command, as below:

vars:= {q[1](tau),q[2](tau),q[3](tau),diff(q[1](tau),tau),diff(q[2](tau),tau),diff(q[3](tau),tau),diff(q[1](tau),tau$2),diff(q[2](tau),tau$2),diff(q[3](tau),tau$2)}:
collect(eqq,vars);

The problem is that the equations remain with non-simplified terms, such as the terms inside the "sine" functions and the term "k[t]*ell^2". The command "simplify" does not have any effect. Ideally, I would like to have something like this:

(diff(q[3](tau), tau, tau))+alpha*q[1](tau)+(-4*alpha+sigma-theta)*q[2](tau)+(5*alpha-sigma+2*theta+1)*q[3](tau)+2*xi*sqrt(lambda)/`ℓ`*(diff(q[3](tau), tau))-`Δθ`*sin(sqrt(Lambda)*tau)*q[2](tau)+`Δθ`*q[3](tau)*sin(sqrt(Lambda)*tau) = 0;

Does anyone know how to solve that?
 

How do i change keyboard shortcuts, E.g one of my keyboard keys are broken or have stopped working. How do i redirect my shortcut to another keyboard combination or another hotkey simply.

Hello, is it possible to have a document synchronized in the same way as Onenote? We're a group of engieneer students wanting to share documents, however the only way we can figure out a way to do it. Is uploading to maplecloud groups, sharing a "base" document, and everytime someone "updates" the document you save a new one. So it kind of defeats the purpose of making it a smart idea of collaborating on one document, am i missing something or is this really how oldschool it works?

Hello,

     I'm trying to simplify an expression involving signum and sqrt using assumptions:

assumptions := { A>0,psi::real,1+A*cos(psi)<sqrt(1+sin(psi)),1+sin(psi)>0 }:
signum(1+A*cos(psi)-sqrt(1+sin(psi))):
simplify(%) assuming op(assumptions);

It seems to me that, given these assumptions, we can safely conclude that the result should be -1. However, I can't get Maple to show this. Interestingly, setting A=1 does allow maple to simplify the result to -1. Is there something I'm missing?


Thanks!

I was wondering how Maple cope with piecewise functions during forward integration and if it's preferable to use dsolve events option in place of defining a piecewise discontinuos function.

As far as I understood dsolve/events halts the integration each time an event is triggered and subsequently restarts the integration using the pre-trigger outputs as new initial conditions. I suppose that by using a piecewise, if a discontinuity is detected, dsolve proceeds exactly in the same way halting and restarting the integration.

Here a toy example of a 2D rolling dice (idea of a rolling dice from the rolling cube by @one man :P ) in which the reaction forces of the floor can be seen as function of the compenetration dice/ground

Both the appraches (events and piecewise) give the same results

falling_dice.mw

Hi, I'm quite a beginner in Maple.

Currently, I'm solving several complex ODE using maple. When I run the code, it gives me some results. However, when I re-run the code using exactly the same equations and parameter, I somehow got completely different results. Using the same input sometimes it gives float(undefined), complex number, or real number.

Could anyone explain what's happening here? Does it mean that my set of ODE is not independent of each other?

Any helps would be greatly appreciated.

Thanks!

We know that Grid:-Map(x->f(x),[x1..xn]) is for parallel computing f(xi)'s but when some xi's are equal I think Maple copies one result for the others. But maybe my function f has some random sampling inside and so will have different output for same inputs. So I need to do parallel computations for same inputs without cheating of copying the result of one for the rest. For a very simple case that Maple copies while it is wrong to copy, see the following.

I will be happy if someone tells me how to solve this issue. Thanks.

More surprising to me is that if I try to use different xi's and then typing same xi's, I will see some new patterns of copying. 

For example in output (3) and (4), first random point of one parallel computation is the second random point of another computation. Or in output (6) only the two last computations are copy of each other!

 

I may need to add that I did this computations on a computer with 4 core processor. Is Maple producing random numbers using something like processor's time? Or something like this?
I can't report Maple computations if they don't really produce random points independently in seperate parallel computations.

If I type pi, Maple just show what I typed, but if I insert the Greek letter pi, then it works. Are there other things that I should take care of them when I'm using "floor" command in my programming?

help me for remove this error.

Error, `;` unexpected
 

thanks_Prab.mw

 

Hello,

      I've noticed a strange phenomenon involving simplify: given the exact same input, its output varies between two different results depending on memory usage patterns.

      I've attached a sample code. There, I have an equation which should simplify to 0=0. If I run the code with garbage collection gc uncommented, it will correctly give 0=0. However, with gc commented out, it gives the unsimplified result result ~80% of the time (with 0=0 the remaining 20%):

1/2*A1*k*epsilon*p*(-I*exp(I*psi__p)*(2-2*cos(2*psi__p))^(1/2)+exp(2*I*psi__p)-1)*exp(-I*psi__p-1/2*2^(1/2)*k^(1/2)*(-k*p*cos(psi__p)+(k^2*p^2+2*k*p*
cos(psi__p)+1)^(1/2)-1)^(1/2)*t)*(-exp(-I*k*x-1/2*I*2^(1/2)*k^(1/2)*(k*p*cos(psi__p)+(k^2*p^2+2*k*p*cos(psi__p)+1)^(1/2)+1)^(1/2)*t)+exp(I*k*x+1/2*I*
2^(1/2)*k^(1/2)*(k*p*cos(psi__p)+(k^2*p^2+2*k*p*cos(psi__p)+1)^(1/2)+1)^(1/2)*t)) = 0

For my particular machine, it seems that when the memory usage is <98.4MB, it gives 0=0, and the unsimplied case otherwise.

      Any idea why this is? It seems odd that simplify would return different results depending on garbage collection, especially since use of gc is now discouraged.

example.txt

A few notes:

  • It seems replacing gc with a simple call to kernelopts(memusage) also produces the correct output
  • This is a snippet of a larger body of code I wrote: there, even without gc, it will sporadically (with the exact same input) produce the correct answer ~50% of the time
  • Only the last 4 lines are relevant; the beginning of the attached code is simply to generate appropriate memory usage and doesn't affect the relevant, final 4 lines

 

Hi all.

Is there a kind soul who can enligthen me on the where abouts of the "print preview" feature in maple 2018?

It does not appear under the "file" -> "print" nor under "file" -> "page setup"

Macbook pro 2018

How do I create a timing diagram simular to

Image result for timing diagram

I do the following:-

1. 

2. TTdf := TruthTable(logic, form = MOD2)

I have tried the statistics package and the timing package. The problem is I get something like

Convert to matrix and add first column to indicate time, e.g 

Where we get an angle rise instead of a vertical rise.

I have also tried it in statistics. The best graph I can get is 

Also tried with no fill and with boarder around the columns, but still cannot get it to look right.

Help much appreciated. Really the Timing Graph should really be available in the Logic Package

Really I want to be able to split the Dataframe into seperate line graphs with a vertical rise and not a angle rise.

Any help would be much appreciated.

P.S I am still learning Maple. I have Maple 2018

Hello

The problem is translate Mathematica code to Maple to find  numerical solution using int(numeric).

I have a more complicated example and here I gives a very simplified version.

I use  successive approximations to solve integral-equation with symbolic int it's easy to do,but with numeric int  I'm failed

MMA code:

func[x_, 0] := x
ifunc[0][x_] := x
func[x_?NumericQ, n_Integer] := x + NIntegrate[(x - y)*ifunc[n - 1][y], {y, 0, x}]
ifunc[j_Integer] := ifunc[j] = Interpolation[Table[{x, func[x, j]}, {x, -3, 3, 0.2}]]

Plot[{Sinh[x], ifunc[n][x] /. n -> 4}, {x, -3, 3}]


My first attempt to translate:

ifunc := proc (n, x) options operator, arrow; x end proc;

ifunc(0, x) := x;

func(x, 0) := x;

func := proc (x, n) x+int((x-t)*ifunc(n-1, t), t = 0 .. x, numeric) end proc;

T := proc (j) option remember;

Interpolation:-Interpolate([seq(x, x = -2 .. 2, .1)], [seq(func(x, j), x = -2 .. 2, .1)], method = cubic)

end proc;

plot([sinh(x), (T(4))(x)], x = -2 .. 2);

See attached file for more info.

Thanks.

test_numeric_volterra.mw

EDITED :----------------------------------------------------------

Third attempt:

func(x, 0) := x;

(ifunc(0))(x) := x:

func := proc (x, n) option remember; x+int((x-t)*(ifunc(n-1))(t), t = 0 .. x, numeric) end proc;

ifunc := proc (j) local f; option remember;

ifunc(0) := proc (t) options operator, arrow; t end proc;

f := proc (t) options operator, arrow;

CurveFitting:-Spline([seq(x, x = -3 .. 3, .1)], [seq(func(x, j), x = -3 .. 3, .1)], x, degree = 1) end proc end proc;

n := 4; plot([sinh(x), (ifunc(n))(x)], x = -3 .. 3)# for n=4 diverge !!!

when using slideshow tool (F11), it just show the first page and arrows for going to other pages does not work. is it a bug?

I'm working with some sum values, but for some reason that I can't figure out, this sum always returns 1.
Have I made some mistake in the way it's supposed to be typed in or why does it return 1? Below the sum I've filled out the spots manually to show how I want them to be.


 

``

x := 2; y := 2; sum(binomial(y, i)*(1/3)^i*(2/3)^(y-i)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = i+1 .. x)), i = 0 .. y)

1

(1)

binomial(y, 0)*(1/3)^0*(2/3)^(y+0)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 1 .. x))+(1/3)*binomial(y, 1)*(2/3)^(y-1)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 2 .. x))+binomial(y, 2)*(1/3)^2*(2/3)^(y-2)*(sum(binomial(x, j)*(1/3)^j*(2/3)^(x-j), j = 3 .. x))

8/27

(2)

``


 

Download Sum_fejl.mw

First 46 47 48 49 50 51 52 Last Page 48 of 62