Maple 2016 Questions and Posts

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

I cant understend how to use new Maple workbook, and i cant load it on a site so i will use screenshoots to explain. I whant to add my costume functions to code attachments and exceuted them in multitipe workshellds, but i dont know how to excecude them from ther + i cant understend how varibles sistem work. For excemple i go main document ex1, in it i save z as global varible for all worksheed, when i excecute it works alright in other workdoxument c2 but when i change it in main document it didnt change in others, but in saved varibles in ex1 saved new value of z , and in all others z is left same as it was. In such whay i can save function f2 wich is declorated in workdocument c2 as varible, it will exceute in main ex1 but any changes of f2 in c2 wudent be applied in ex2, if i declorated and excecude f1 in c1 code attachment it dont even generate in varibles tables + i dont see any whay to excecute it from ex1, so here the qestion how to excecute functions saved in code attachments in other book's wordsheets and how make saved varibles usable in all book?


 

with(Statistics):````

X := Statistics:-RandomVariable(Normal(0, 1)):

PDF(sin(X), t)

piecewise(t <= -1, 0, t < 1, 2^(1/2)*exp(-(1/2)*arcsin(t)^2)/(Pi^(1/2)*(-t^2+1)^(1/2)), 1 <= t, 0)

(1)

int(%, t = -1 .. 1)

2*erf((1/4)*Pi*2^(1/2))

(2)

evalf(%)

1.767540069

(3)

``


There were recently submitted a dozen Maple bugs by me and others. Maplesoft have brought no responses. They keep strategic silence. True merit is not afraid of criticism.

Download Bug_in_Statistics_PDF.mw

Let us consider 

restart; J := int(cos(a*x)^2/(x^2-1), x = -infinity .. infinity, CPV);
-(1/4)*Pi*sin(2*a)*csgn(I*a)-(1/4)*Pi*sin(2*a)*csgn(I/a)

This result is not true for a=I:

eval(J, a = I);
                               0

In this case the integral under consideration diverges because of 

cos(I*x)^2;
                                
                            cosh(x) ^2

 

Let us consider 

maximize(int(exp(-x^4), x = k .. 3*k), location);

Error, (in maximize) invalid input: iscont expects its 1st argument, f, to be of type algebraic, but received x = k .. 3*k
whereas the expected output is 

[(2*((1/40)*GAMMA(1/4, (1/80)*ln(3))*5^(1/4)*ln(3)^(3/4)-(1/40)*GAMMA(1/4, (81/80)*ln(3))*5^(1/4)*ln(3)^(3/4)))*5^(3/4)*(1/ln(3))^(3/4), [k = (1/10)*10^(3/4)*ln(3)^(1/4)]]

as Mma 11 produces. The following 

RealDomain:-solve(diff(int(exp(-x^4), x = k .. 3*k), k));
  -(1/10)*5^(3/4)*ln(3)^(1/4), (1/10)*5^(3/4)*ln(3)^(1/4)

is not a workaround because of 

int(exp(-x^4), x = (1/10)*5^(3/4)*ln(3)^(1/4) .. (3/10)*5^(3/4)*ln(3)^(1/4));
  FAIL

 

Hi, I was wondering, as stated in the title, if it is possible to plot/draw a triangle knowing only the sides and angles, and not the coordinates for each point making up its corners. If not, what would be the easiest way, to calculate the coordinates using the sides and angles (assuming I know the value for each side and corner) and then plot/draw it?

I'm rather green when it comes to using Maple, so if you could explain it in a simple way that would be appreciated. 

I try to solve numerically a boundary VP for ODE with different order of discontinuity of right part.

Say, the following BVP is given:

y''(x)+y'(x)+y(x)=F(x)

y(0)=1, y(2)=1

Let's use piecewise right part

F  := piecewise(x<=1, -x, x>1, 2*x+(x-1)^2)

plot(piecewise(x<=1, -x, x>1, 2*x+(x-1)^2), x=0..2,thickness=5)

The function

piecewise(x<=1, 1-x, x>1, (x-1)^2)

plot(piecewise(x<=1, 1-x, x>1, (x-1)^2), x=0..2, color=blue,thickness=5)

as obviuos, satisfies the BVP exclung the point x=1, where its 1st and 2nd derivatives are discontinuos.

Numerical solution

N0:=6:
As:=dsolve([diff(y(x), x$2)+diff(y(x), x)+y(x)=F,  y(0)=1, y(2)=1], y(x), type=numeric, output = Array([seq(2.0*k/N0, k=0..N0)]), 'maxmesh'=500, 'abserr'=1e-3):

provides the solution essentially different to exact one described above:

But if to use the right part

F := piecewise(x<=1, x^2+x+2, x>1, -x^2+x)

plot(piecewise(x<=1, x^2+x+2, x>1, -x^2+x), x=0..2, color=blue,thickness=5)

for which the function

piecewise(x<=1, 1-x+x^2, x>1, -1+3*x-x^2)

plot(piecewise(x<=1, 1-x+x^2, x>1, -1+3*x-x^2), x=0..2, thickness=5)

satisfies the BVP excluding x=1, where this function has discontinuity of 2nd derivative only, the corresponding numerical solution is very similar to this exact solution:

This reason of the difference between these two cases is clear. In the first case both 1st and 2nd derivatives are discontiuos, while in the second one -- 1st derivative is contiuos.

I wonder, if there are numerical methods, implemeted in Maple, for numerical solution of the first type BVP with non-smooth right part?

Let us consider 

MultiSeries:-series(Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)), x = 0);

x-(1/2)*x^2+(1/4)*x^4-(1/2)*x^6 +O(x^7)

The above result contradicts 

MultiSeries:-limit(diff(Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)), x), x = 0);
                           undefined
MultiSeries:-limit((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = 0, right);
                               1
MultiSeries:-limit((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = 0, left);
                           undefined
plot((Psi((2*x+1)/(2*x))-Psi((x+1)/(2*x)))/x, x = -0.1e-1 .. 0.1e-2, discont, y = -5 .. 5);

How can I get maple2016 to simplify sqrt(3579757) to 151*sqrt(157) ?

HI

please help me for dsolve this nonlinear differential equations

thanls...

HAB.mw
 

restart; Digite := 100; Phi0 := 5; A := b*h; g13 := 31/250000000; g1 := 113/500000; f13 := 1/1000000000; c1 := 226000000000000; b := 10*10^(-9); J := (1/12)*b*h^3; h := 15*10^(-9); L := 100*10^(-9); E1 := (339/10000000000000000000000)*(diff(u(x), x, x, x, x))+(1017/10000000000000000000000)*(diff(w(x), x, x))*(diff(w(x), x, x, x))+(339/10000000000000000000000)*(diff(w(x), x, x, x, x))*(diff(w(x), x))-(339/10000)*(diff(u(x), x, x))-(339/10000)*(diff(w(x), x))*(diff(w(x), x, x)) = 0

E2 := -(1017/1600000000000000000000000000000000000000)*(diff(w(x), x, x, x, x, x, x))+(1589109/2500000000000000000000000)*(diff(w(x), x, x, x, x))-(339/10000*(diff(u(x), x, x)+(diff(w(x), x))*(diff(w(x), x, x))))*(diff(w(x), x))-(diff(w(x), x, x))*((339/10000)*(diff(u(x), x))+(339/20000)*(diff(w(x), x))^2+0.5824000000e-4)+(339/10000000000000000000000)*(diff(w(x), x, x))*(diff(u(x), x, x, x)+(diff(w(x), x, x))^2+(diff(w(x), x, x, x))*(diff(w(x), x)))+(339/10000000000000000000000)*(diff(w(x), x))*(diff(u(x), x, x, x, x)+3*(diff(w(x), x, x))*(diff(w(x), x, x, x))+(diff(w(x), x, x, x, x))*(diff(w(x), x)))-2 = 0:
 

E3 := -5.385803274*10^(-17)*(diff(Phi(x), x, x))+2.659881780*Phi(x)-5.125107476*10^(-20)*(diff(psi(x), x, x))+1.146681319*psi(x)+3.300000000*10^(-8)*(diff(w(x), x, x)) = 0:

E4 := -5.125107476*10^(-20)*(diff(Phi(x), x, x))+1.146681319*Phi(x)+(891/100000000000000)*(diff(psi(x), x, x))/Pi+34976.39822*psi(x)+0.4351500000e-5*(diff(w(x), x, x)) = 0:

dsys3 := {EQ1, EQ2, EQ3, EQ4, c1*J*((D@@2)(w))(0)+A*g13*((D@@2)(w))(0)-2*b*f13*Phi0-g1*J*((D@@4)(w))(0)+g1*A*(((D@@2)(u))(0)+((D@@1)(w))(0)*((D@@2)(w))(0))*((D@@1)(w))(0) = 0, c1*J*((D@@2)(w))(L)+A*g13*((D@@2)(w))(L)-2*b*f13*Phi0-g1*J*((D@@4)(w))(L)+g1*A*(((D@@2)(u))(L)+((D@@1)(w))(L)*((D@@2)(w))(L))*((D@@1)(w))(L) = 0, Phi(0) = 0, Phi(L) = 0, psi(0) = 0, psi(L) = 0, u(0) = 0, u(L) = 0, w(0) = 0, w(L) = 0, (D(u))(0) = 0, (D(u))(L) = 0, ((D@@2)(w))(0) = 0, ((D@@2)(w))(L) = 0}; dsolve(dsys3, numeric, initmesh = 3024, abserr = 0.1e-4)

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

``


 

Download HAB.mw

 

restart; with(Statistics):
X := RandomVariable(Normal(0, 1)): Y := RandomVariable(Uniform(-2, 2)):
Probability(X*Y < 0);

crashes my comp in approximately 600 s. Mma produces 1/2 on my comp in 0.078125 s.

Why Deplot3d does not work in Maple 2016?

For example, 

with(DEtools);

DEplot3d({diff(y(x), x) = y(x)-z(x), diff(z(x), x) = z(x)-2*y(x)}, {y(x), z(x)}, x = 0 .. 3, [[y(0) = 1.638, z(0) = 2.31]], y = 0 .. 2, z = -4 .. 4, scene = [x, z(x), y(x)], linecolor = COLOR(HUE, .5));

There is nothing shown in Maple 2016.

Let us consider

with(Statistics):
X1 := RandomVariable(Normal(0, 1)):
X2 := RandomVariable(Normal(0, 1)):
X3 := RandomVariable(Uniform(0, 1)): 
X4 := RandomVariable(Uniform(0, 1)):
Z := max(X1, X2, X3, X4); CDF(Z, t);

int((1/2)*(_t0*Heaviside(_t0-1)-_t0*Heaviside(_t0)-Heaviside(1-_t0)*Heaviside(-_t0)+Heaviside(-_t0)+Heaviside(1-_t0)-1)*(1+erf((1/2)*_t0*2^(1/2)))*(2^(1/2)*Heaviside(_t0-1)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(_t0)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(-_t0)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0-1)+2^(1/2)*Heaviside(-_t0)*exp(-(1/2)*_t0^2)+2^(1/2)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*Dirac(_t0)-Pi^(1/2)*undefined*Dirac(_t0-1)+Pi^(1/2)*Heaviside(_t0-1)*erf((1/2)*_t0*2^(1/2))-Pi^(1/2)*Heaviside(_t0)*erf((1/2)*_t0*2^(1/2))-exp(-(1/2)*_t0^2)*2^(1/2)+Pi^(1/2)*Heaviside(_t0-1)-Pi^(1/2)*Heaviside(_t0))/Pi^(1/2), _t0 = -infinity .. t)

whereas Mma 11 produces the correct piecewise expression (see that here screen15.11.16.docx).

Edit. Mma output.

I'm trying solve a problem with NLPSolve using procedures like constraints, but it say: Error, (in Optimization: -NLPSolve) constraints must be specified as a set or list of procedures. Theses constraints are inequality and equality.  How i can get procedures as a list or set?. Is there anyone to give a example of it?. Thanks!

Hello

I have a procedure that builds an ideal from a specific set of polynomials and then calls the Groebner basis package to eliminate some of the variables.  Even though the procedure is running on a machine with 2 processors, 24 cores and 72 GB of ram, only one core has been used (and is always on a 100% usage).  Would the Grid Computing Toolbox be of some hope in this case?  If so,  how to insert the Grid commands so that Maple sends the calculations to the other cores (I find the document rather confusing)?   If I am talking non sense,  please let me know.

Many thanks

Ed

 

 

 

fieldplot is a wonderful tool for plotting vector fields. The option 'fieldstrength' is very useful to scale the arrows so that one can better visualize the field. I often use fieldstrength=log.

However, if one includes the RealDomain library, the fieldstrength=log option fails. I don't see why it should. Can someone enlighten me before I report this as a bug.

First 41 42 43 44 45 46 47 Last Page 43 of 61