## Recursive Assignment Errors...

Is there any way we can get maple to tell us which variable we are recursively assigning?

## Why is this an error?...

solve({-infinity < a , a < -1, -1 < b ,  b < 0});

## Why is this piecewise plot giving an error? Pls he...

f(x) := piecewise(0 < x, x^(3/2)*sin(1/x), x = 0, 0, undefined);
plot(f(x));

gives me the following error:

Error, (in plot) incorrect first argument piecewise(0 < x, (HFloat(2.739493386336394e-116)+HFloat(2.739493386336394e-116)*I)*x^(3/2), x = 0, 0, undefined)

I just want to see the function plot. With Wolfram Alpha this is no deal at all!

## Statistics fails to reject invalid parameter value...

Maple doesn't completely check the condition on the number of trials "n" for Binomial and NegativeBinomial distributions (package Statistics).
The attribute "Conditions" explicitely says that n must be a strictly positive integer but no strictly positive real valuereturna an error (ok, it would be stupid to set n to a non integer value !!!).

I think it is a default that ought to be corrected in future releases (this default still exists in Maple 2018)

 > restart
 > kernelopts(version)
 (1)
 > with(Statistics):

BINOMIAL DISTRIBUTION

 > X := RandomVariable(Binomial(n, p)): L := [attributes(X)][3]: A := exports(L)
 (2)
 > L:-Conditions
 (3)
 > # Maple should return an error for N is not of type posint # # It seems that Sample uses floor(N) N := 10.49; type(N::posint); P := 1/2: X := RandomVariable(Binomial(N, P)): Mean(X), N*P; ProbabilityFunction(X, k); S := Sample(X, 10^6): Mean(S); # A non consistent result (only non negative values of k should be accepted) eval(ProbabilityFunction(X, k), k=evalf(Pi));
 (4)

NEGATIVE BINOMIAL DISTRIBUTION

 > X := RandomVariable(NegativeBinomial(n, p)): L := [attributes(X)][3]: A := exports(L): L:-Conditions
 (5)
 > N := 10.49: P := 1/2: X := RandomVariable(NegativeBinomial(N, P)): Mean(X)

## When i type sqrt(25), i get 1.81847767202745*10^(-...

Yeah, i have tried evalf[10](sqrt(25)).
How can i get a simple number as answer? I'm loving the software but i just wished i could type in:
int(sin(x), x = 0 .. pi)
and get 2 instead of (2.739493386*10^(-116) + (2.739493386*10^(-116))*I)*pi.
Also, when i type evalf[50](pi), i wish to get all the 50 digits, but i just get \pi :/.

## How to solve initial Newton iteration is not conve...

I want to solve an ODE system numerically, but maple show not converge for iteration, can you give a solution
with(VectorCalculus);
with(linalg);

pi := 4; eta := 6; mh := .1; mv := .3; bh := .15; Nh := 400; Nv := 200; bv := .25; b := .8; d := .1; p := .5; B := 10; A := 1; alpha := .25; beta := .7; K := 400; r := .5; c := .9; q := .8; Sh0 := 225; Sv0 := 100; Ih0 := 175; Iv0 := 600; P0 := 50; T := 35; B := 10;

eq1 := diff(L1(t), t) = -L1(t)*(-bh*b*Iv(t)/Nh-mh)-L2(t)*bh*b*Iv(t)/Nh; eq2 := diff(L2(t), t) = -L2(t)*(-mh-d)+L3(t)*bv*b*Sv(t)/Nv-L4(t)*bv*b*Sv(t)/Nv; eq3 := diff(L3(t), t) = -(L4(t)*Iv(t)+L3(t)*Sv(t))*L3(t)/(2*B^2)-L3(t)*(-bv*b*Ih(t)/Nv-mv-L3(t)*Sv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L4(t)*(bv*b*Ih(t)/Nv-L3(t)*Iv(t)/(2*B^2))-L5(t)*P(t)*alpha; eq4 := diff(L4(t), t) = -A-(L4(t)*Iv(t)+L3(t)*Sv(t))*L4(t)/(2*B^2)+L1(t)*bh*b*Sh(t)/Nh-L2(t)*bh*b*Sh(t)/Nh+L3(t)*L4(t)*Sv(t)/(2*B^2)-L4(t)*(-mv-L4(t)*Iv(t)/(2*B^2)-(L4(t)*Iv(t)+L3(t)*Sv(t))/(2*B^2)-P(t)*alpha)-L5(t)*P(t)*alpha; eq5 := diff(L5(t), t) = L3(t)*Sv(t)*alpha+L4(t)*Iv(t)*alpha-L5(t)*(r*(1-P(t)/Nv)-P(t)*r/Nv+alpha*(Sv(t)+Iv(t))-q*c); eq6 := diff(Sh(t), t) = pi-bh*b*Sh(t)*Iv(t)/Nh-mh*Sh(t); eq7 := diff(Ih(t), t) = bh*b*Sh(t)*Iv(t)/Nh-mh*Ih(t)-d*Ih(t); eq8 := diff(Sv(t), t) = eta-bv*b*Sv(t)*Ih(t)/Nv-mv*Sv(t)-P(t)*Sv(t)*alpha-L3(t)*Sv(t)^2/(2*B^2)-L4(t)*Sv(t)*Iv(t)/(2*B^2); eq9 := diff(Iv(t), t) = -L3(t)*Sv(t)*Iv(t)/(2*B^2)+bv*b*Sv(t)*Ih(t)/Nv-mv*Iv(t)-P(t)*Iv(t)*alpha-L4(t)*Iv(t)^2/(2*B^2); eq10 := diff(P(t), t) = P(t)*r*(1-P(t)/Nh)+P(t)*alpha*(Sv(t)+Iv(t))-q*P(t)*c

fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t), Sh(t), Sv(t)}; a := dsolve({eq1, eq10, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, Ih(0) = Ih0, Iv(0) = Iv0, L1(T) = 0, L2(T) = 0, L3(T) = 0, L4(T) = 0, L5(T) = 0, P(0) = P0, Sh(0) = Sh0, Sv(0) = Sv0}, fcns, type = numeric);
fcns := {Ih(t), Iv(t), L1(t), L2(t), L3(t), L4(t), L5(t), P(t),

Sh(t), Sv(t)}
Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging



## How can i get the procedure to plot for coupled di...

Dear Maple user  help required to  evaluate the values of u and v from  coupled difference scheme  and plot the 2D multiple curves by changing the values of M  and R .  By seeing mapleprime post i have written sample codes

restart; Digits := 5; with(plots); with(LinearAlgebra);
#Parameter values:
a:=0:b:=2:N:=9:
h:=(b-a)/(N+1): phi:=0.5:
K:=10^(-6):mu:=1.67:
alpha:=K/(phi*mu):lambda:=alpha*k/h^2:

#Initial conditions
for i from 0 while i <= N do u[i, 0] := h*i+1 end do;

#Initial conditions
for i from 0 while i <= N do v[i, 0] := h*i+1 end do;

#Boundary conditions
for j from 0 while j <= N+1 do u[0, j] := .1; u[N+1, j] := .5 end do;

#Boundary conditions
for j from 0 while j <= N+1 do v[0, j] := .2; v[N+1, j] := R end do;

#Discritization scheme
printlevel := 2; for i while i <= N do for j from 0 while j <= N do eq1[i, j] := lambda*u[i-1, j]+(M.(2-2*lambda))*u[i, j]+lambda*u[i+1, j] = -lambda*u[i-1, j+1]+(2+2*lambda)*v[i, j+1]-(M.lambda)*u[i+1, j+1] end do end do;

#Discritization scheme
printlevel := 2; for i while i <= N do for j from 0 while j <= N do eq2[i, j] := lambda*v[i-1, j]+3*lambda*v[i, j]+(M.lambda)*v[i+1, j] = -lambda*u[i-1, j+1]+(M.(7-2*lambda))*u[i, j+1]-lambda*v[i+1, j+1] end do end do;
# how to solve the two equations (1 and 2) in terms to calculate the values of u and v and plot the graphs in 2 dimension while #changing the values of M=0,5,10 (variable), R=0,0.5,0.7
# I am unable to write the codes  further

###############################################################
restart:
#sys := ([seq])(seq(eq[i, j], j = 0 .. N), i = 1 .. N):
nops(sys);
vars:=indets(sys) minus {k}:
nn := Matrix(N+1, N+1,(i, j)-> u[i-1, j-1]):
##
p:=proc(kk) local u_res,A;
u_res:=solve(eval(sys,k=kk),vars);
A:=eval(nn,u_res);
plots:-matrixplot(A)
end proc;
## Testing p for k=0.001:
p(0.001);
## Animating the plot for k=0.0001..0.001:
plots:-animate(p,[k],k=0.0001..0.001);
#################################################################

## platform for running calculation...

Does maple provide any platform for running calculation something like cloud facility

## Severe basic bug in Maple 2019.1 in Document Mode?...

Dear Maple users

Some students have come to us to report, that something doesn't seem to work properly in Maple 2019.1 in Document Mode. And they seem to be right: writing an passive math formula by using Shift+F5 (the formula is gray, not blue), then using F5 to get out of that Math field and back into Text Mode. Using the Enter key to go to the next line: It doesn't work! The cursor stays in the same line. This behavior is new in Maple 2019. It worked properly in Maple 2018 and earlier. I assume it is not the intention?

I know it can easily be dealt with by making a new Paragraph by using the shortcut Ctrl+Shift+J. I call the assumed bug 'severe' though, because it will severely delay the workflow for many students. They are used to deliver a document mixed with formulas (active or passive) and text.

NB! I have tested it on several computers (Mac and Windows), and it doesn't work on any of them.

Regards,

Erik V.

## how to keep set members in order of addition...

i have a question about sets. how can i keep set members in order of addition not the defualt maple ordering.
in maple help, i saw the command setsort=0..8 but i do not know how to use it.
consider exmaple below:

 > restart
 > L:={}:
 > for j in [3,5,6,1] do birth:=j: L:=union(L ,{j}); od;
 (1)
 >

how can i keep L as order of addition? L={3,5,6,1}. thanks in advance

## Trouble converting units directly from evaluation ...

I've recently changed to maple 2019, from the 2016 version as my license for that product had expired.
However I find it really frustrating that often upon evaluating an expression I can't convert the units.

For instance I had a calculation that evaluated to:

2.114163508*10^7 [kg/s^2]

When I try to directly replace the units within maple to instead be [J/m^2] I recieve the following error message:

"Error, (in  Units:-TestDimensions) 'op(3, i) does not  evaluate to module"

There is no explanation for this error when I try to look it up. However if I once again manually write the answer:
2.114163508*10^7 [kg/s^2] and use the replace units function.
No problem.
I find this quite annoying and frustrating and I hope you can help.

Best regards

Anders Alexander Wagenblast

## how does Maple decide which is simpler expression?...

This is may be a philosophical question. But sometimes Maple suprises me when telling it to "simplify" expression. As in this example.

 > expr:=1/(y^3+1)^(2/3);

 > int(expr,y)

 > simplify(%)

 >

For me, the original result is "simpler". (Not only smaller leaf count, but it has one special function, vs. two: Legendre and Gamma). But may be Maple considers hypergeom always more "complex" than any other?

That is why I use simplify(expr,size) because I am scared of simplify without any option, as I have little idea how it decides which is simpler.

Any thoughts from the experts on how Maple decided to simplify something when no option is used? What kinds of rules it uses to decide how to transform the expression?

Maple 2019.1

## Web Camera feed for Video Components...

The video component is going to save me alot of hassle in that I was previously building external java applications for audio visual analysis purposes, with the downside of course being that I didnt have maple code at my disposal.

I read in the manual for the video component that I can provide a HTTP address for which a video is located, which would mean i could probably stream an IP camera, but I can I use the localhost IP address with some sort of extension that directs to the I/O of a webcamera connected to my local machine?