Maple 2018 Questions and Posts

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

 

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

The issue concerns calculation of 2nd derivative of the numerical solution of 2nd order BVP for an ordinal DE.

Lets consider a test problem:

-y’’(t)+y(t)=t*sin(5*t)

y(0)=0.2, y(1)=1

 Numerical solution was obtained by

dsolve([-diff(F(x), x$2)+F(x)= x*sin(5*x), F(0)=0.2, F(1)=1], [F(x)], type = numeric, 'output' = Array([seq(k/5, k=0..5)]));

 

dsolve returns the values of the solution and its 1st derivative (for the test example, a solution can be obtained analytically, but for general case I require numerical solution)..

It is needed to calculate the 2nd derivative of the solution.

I tried to use the Bessel method, when the solution’s 2nd derivative is calculated as the 2nd derivative of 5th degree polynomial having in consequent points t1, t2, t3 the values y(t1), y(t2), y(t3) and 1st derivatives y’(t1), y’(t2), y’(t3), all obtained from the numerical solution. Later I use Hermit piecewise-polynomial interpolation, based on values of the solution and its 1st and 2nd derivatives (polynomial of 5th degree).

Unfortunately, 2nd derivative of such interpolation has a large non-smoothness.

Here, we see the solution. It is smooth.

Here, 1st derivative. Still smooth enough.

Here, 2nd derivative. Typical view with large and sharp teeth.

 

 

Maybe, there exists a simple method for calculation of more smooth 2nd derivative?

Also. it is desirable that it would be embedded in Maple.

How I can solve these time delay  differential equations?

please see attatched files.

Best

Doc191.pdf

ny.mw

 


 

restart; d[1] := 1; d[2] := 4; d[3] := 1; r[1] := 1; r[2] := 1; r[3] := 1; r[4] := .5; a[11] := .5; a[12] := 3; a[21] := 2; a[22] := .8; a[23] := 1; a[32] := .5; a[33] := .9; tau := .3

diff(u(t, x), t) = d[1]*(diff(u(t, x), x, x))+u(t, x)*{r[1]-a[11]*u(t, x)-a[12]*v(t, x)}

diff(u(t, x), t) = diff(diff(u(t, x), x), x)+u(t, x)*{1-.5*u(t, x)-3*v(t, x)}

(1)

diff(v(t, x), t) = d[2]*(diff(v(t, x), x, x))+v(t, x)*{r[2]+a[21]*u(t-tau, x)-a[22]*v(t, x)-a[23]*w(t-tau, x)}

diff(v(t, x), t) = 4*(diff(diff(v(t, x), x), x))+v(t, x)*{1+2*u(t-.3, x)-.8*v(t, x)-w(t-.3, x)}

(2)

diff(w(t, x), t) = d[3]*(diff(w(t, x), x, x))+w(t, x)*{r[3]+a[32]*v(t, x)-a[33]*w(t, x)}

diff(w(t, x), t) = diff(diff(w(t, x), x), x)+w(t, x)*{1+.5*v(t, x)-.9*w(t, x)}

(3)

0 < x and x < Pi, t > 0

0 < x and x < Pi, 0 < t

(4)

diff(u(t, x), x) = 0, diff(v(t, x), x) = 0, diff(w(t, x), x) = 0, x = 0, x = Pi, t >= 0

diff(u(t, x), x) = 0, diff(v(t, x), x) = 0, diff(w(t, x), x) = 0, x = 0, x = Pi, 0 <= t

(5)

u(t, x) > 0, v(t, x) > 0, w(t, x) > 0, `in`(t, x, `&x`([-tau, 0], [0, Pi]))

0 < u(t, x), 0 < v(t, x), 0 < w(t, x), `in`(t, x, [-.3, 0]*[0, Pi])

(6)

``

``


 

Download ny.mw

Hi guys and girls, 

 

The new Maple 2018 have a feature in the buttom called editable. If you remove that mark in the buttom of the screen, then maple doc can't be edited. I teach students who have english as a second language and some remove the mark in the editable box by mistake. Such that they can't do there hand-ins etc. 

 

So is there anyway to disable the editable box in the buttom of the screen? 

 

thanks in advance.

Fred

For some unknown reason, the code below does not work in Maple 2018.1, but works in Maple 2015 and Maple 2017 (the idea is taken from here

restart; 
with(plottools): with(plots):
V1,V2,V3,V4,V5,V6,V7,V8:=[0,-1,0],[0,0,0],[1,0,0],[1,-1,0],[0,-1,1],[0,0,1],[1,0,1],[1,-1,1]:  # The vertices of the cube
Faces:=[[V1,V4,V8,V5],[V5,V6,V7,V8],[V2,V3,V7,V6],[V1,V2,V3,V4],[V3,V4,V8,V7],[V1,V2,V6,V5]]: # The list of the faces
Colors:=[green, red,RGB(1, 0, 4),blue,grey,gold]: # The list of the colors
Cube[0]:=display([seq(polygon(Faces[i],color=Colors[i]),i=1..6)]):

for n from 1 to 7 do
F[n]:=t->rotate(Cube[n-1],t, [[0,n-1,0],[1,n-1,0]]):
Cube[n]:=rotate(Cube[n-1],-Pi/2, [[0,n-1,0],[1,n-1,0]]):
A[n]:=animate(display,[F[n](t)], t=0..-Pi/2,paraminfo=false);
od:

for m from 6 to 0 by -1 do
G[m]:=t->rotate(Cube[m+1],t, [[0,m,0],[1,m,0]]):
B[m]:=animate(display,[G[m](t)], t=0..Pi/2,paraminfo=false);
od:

C1:=display([seq(A[k], k=1..7)], insequence):
C2:=display([seq(B[k], k=6..0, -1)], insequence):
display([C1,C2], insequence, scaling=constrained, axes=normal);

 

I currently have a procedure that runs a fairly complicated formula involving non-commutative variables. The procedure is Vu(a, b, c) where a, b, and c are any integers. I have to run this formula whenever vacub appears in my expression. I'm currently replacing each variable of this type with the procedure Vu(a, b, c). I'm wanted to automate that process if possible. One thought I had was to assign the value of Vu(a, b, c) to the variable vacub for any value of a, b, and c from 1 to 5. Then use the eval command to replace the variables with the proper values. Is there any way to automate this process? Let me give you an example:

v0u0 = u0v0 + 2w0

So u0v0u0 = u0(u0v0+2w0) = u02v0+2u0w0

I have a procedure to truncate algebraic equations. Found the basic answer hrere. I would like to make it handle equations and functions i.e f:=a x^2 +b y... and f(x,y):=c x y^2.... I can make it handle the first type but not the second.

restart

``

NULL

NULL

Trunc := proc (eq, odr := 2, v::list := [x, y, z]) local a, b, q; description " Truncates an algebraic equation to required degree"; a := eq; b := v; map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a) end proc

proc (eq, odr := 2, v::list := [x, y, z]) local a, b, q; description " Truncates an algebraic equation to required degree"; a := eq; b := v; map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a) end proc

(1)

"E1(x,y,z):=2+3 x-y+5 x^(2)y+4 x y+x y^(3)+3 a^(2)+z+z^(2)"

proc (x, y, z) options operator, arrow, function_assign; 2+3*x-y+5*x^2*y+4*y*x+x*y^3+3*a^2+z+z^2 end proc

(2)

Trunc(E1, 2, [x, y, z])

E1

(3)

``

E2 := E1(x, y, z)

x*y^3+5*x^2*y+3*a^2+4*x*y+z^2+3*x-y+z+2

(4)

Trunc(E2, 1, [x, y])

3*a^2+z^2+3*x-y+z+2

(5)

Trunc(E2, 1, [x, y, z])

3*a^2+3*x-y+z+2

(6)

``whattype(E1(x, y, z))

`+`

(7)

whattype(E2)

`+`

(8)

``


 

Download Truncate.mw

Could anyone tell me why Maple changes the sign of some expressions? For example...

I would like the outputs to be that way.

sqrt(r/(r-b))

How to prevent this changes?

Thanks in advance,

 

Denis

Hello

I want to compute integral with Maple,but returns unevaluated for me.

int((-5*ln(x)^4*Pi^4-20*ln(x)^2*Pi^4-8*Pi^4+120*MeijerG([[0, 0], [1, 1, 1]], [[0, 0, 0, 0, 0], []], x^Pi))/(120*Pi^4*(-1+x)^2), x = 4/10 .. 6/10, numeric);

# ???

Thanks.

Hello all

I am teaching engineering and I use Maple to make handouts with solutions to assignments.

In Maple 2017 I used interface(displayprecision=4) to make maple it display all outputs with 4 significant digits.

Just to be clear:

If the actual value is 123.456789, then interface(displayprecision=4) makes it display 123.5 in Maple 2017. This is just how I want it.

If the actual value is 1.23456789, the interface(displayprecision=4) makes it diplay 1.235 in Maple 2017. Again, this is perfect, just how I (and most engineers) like it.

Now I have installed Maple 2018 and now interface(displayprecision=4) means 4 decimal points rather than significant digits.

So:

123.456789 => 123.4568 in Maple 2018

1.23456789 => 1.2346  in Maple 2018

This is NOT what I want.

Digits or, say, evalf[4] will not work as a fix, as I only want the DISPLAYED value to have 4 significant digits, I want the entire value used in calculations.

I am told (by Carl Love, thank you Carl) that displayprecision=4 means 4 decimal points in most versions of Maple, but I do need 4 significant digits.

Is there a fix in Maple 2018? Something that will make all output values display with 4 significant digits?

I am considering re-installing Maple 2017 and reverting to it, it turns out to be a huge work to format each output value.

I hope someone can help me, thank you in advance.

Regards, raskr

 

 

 

First 45 46 47 48 49 50 51 Last Page 47 of 61