MaplePrimes Questions

restart;

eq32r:=diff(B(r),`$`(r,3))+diff(B(r),r);

diff(diff(diff(B(r), r), r), r)+diff(B(r), r)

(1)

with(PDEtools, casesplit, declare); with(DEtools, gensys):declare(b(r), prime = r);

[casesplit, declare]

 

b(r)*`will now be displayed as`*b

 

`derivatives with respect to`*r*`of functions of one variable will now be displayed with '`

(2)

eq32r;

diff(diff(diff(B(r), r), r), r)+diff(B(r), r)

(3)

latex(eq32r);

{\frac {{\rm d}^{3}}{{\rm d}{r}^{3}}}B \left( r \right) +{\frac

{\rm d}{{\rm d}r}}B \left( r \right)

 

#instead of {\frac {{\rm d}^{3}}{{\rm d}{r}^{3}}}B I want to have B''' in my latex file.

``

``

Download convert-latex.mw

Hi everybody

I have a differential equation where derivatives (for example d/dr) have been displayed by prime notation.

I want to convert this equation latex format by keeping the prime notation not d/dr.

I would appreciate it if anyone could help me.

I have attached a sample code.

Thank you

Hadi

I'm having problems trying to plot a discrete plot for a Poisson Distribution CDF.  I followed a model found elsewhere that someone had used to do a discrete plot of a sum.  The OP, in that case, was looking to plot a partial sum of:

sum(1/(n^3*sin^2(n)),n=1..400);

The solution that was suggested to the OP was the following:
 

with(DynamicSystems):
f[N1_]=sum[1/(n^3*sin^2[n]), {n,1,N1}];
DiscretePlot[f[x], {x,0,400},PlotRange->All];



Using that solution as a guide, I tried this:
 

with(DynamicSystems):
lambda := 15.4;
f[N1_] = sum[exp(-lambda)*lambda^n/n!, {0, N1, n}];
DiscretePlot[f[x], {0, 50, x}, PlotRange -> All];

In the attached image, you can see the output from my attempt.

I am completely flummoxed. Any suggestions would be greatly appreciated.

Dear Maple Expeets, In the attached Maple file, I have three procedures that are run smoothly. I am trying to compare outputs from each procedure to see which one if larger than the others. For changes on two parameters (alpha and delta), I used implicitplot and inequal commands to identify each region by a specific color. But the outcome is not reasonable. Would you please help with this? Thanks in advance!

NULLNULL

restart

with(plots)

c := 1; cr := 0.3e-1*c; u := 1; sExp := 0.6e-1*c; s := .65*c; v := 3*c

NULL

FirmModelPP := proc (alpha, delta) local p0, xi0, q0, Firmpf0, G0, Recpf0, Unsold0, Environ0, SoldPre0; option remember; xi0 := 1; p0 := min(s+sqrt((v-s)*(c-s)), delta*v+sExp); q0 := u*(v-p0)/(v-s); f(N) := 1/u; F(N) := N/u; G0 := int(F(N), N = 0 .. q0); Firmpf0 := (p0-c)*q0-(p0-s)*G0; Recpf0 := (sExp-cr)*xi0*q0; Environ0 := q0+G0; Unsold0 := G0; SoldPre0 := 0; return p0, q0, Firmpf0, Recpf0, Environ0, Unsold0, SoldPre0 end proc

NULL

FirmModelFC := proc (alpha, beta, delta) local p00, xi00, q00, Firmpf00, G00, Recpf00, Unsold00, Environ00, pr00, SoldPre00; option remember; xi00 := 1; p00 := s+sqrt((v-s)*(c-s)); if p00 < delta*v+sExp then q00 := u*(v-p00)/(v-s); f(N) := 1/u; F(N) := N/u; G00 := int(F(N), N = 0 .. q00); Firmpf00 := (p00-c)*q00-(p00-s)*G00; Recpf00 := `&xi;00*q00*`(sExp-cr); Unsold00 := G00; Environ00 := q00+Unsold00 else q00 := alpha*u*(v-p00)/(v-s); f(N) := 1/u; F(N) := N/u; G00 := int(F(N), N = 0 .. q00/alpha); pr00 := p00-delta*v; Firmpf00 := (p00-c)*q00-alpha*(p00-s)*G00; Recpf00 := (sExp-cr)*xi00*q00+(beta*xi00*q00-(1/2)*beta^2*xi00^2*q00^2/(u*(1-alpha)))*(pr00-sExp); Unsold00 := G00; Environ00 := q00+Unsold00; SoldPre00 := beta*xi00*q00-(1/2)*beta^2*xi00^2*q00^2/(u*(1-alpha)) end if; return p00, q00, Firmpf00, Recpf00, Environ00, Unsold00, SoldPre00 end proc

NULLNULL

NULL

FirmModelHmax := proc (alpha, beta, delta) local q, p, pr, FirmpfSiS, F1, G1, G2, G3, RecpfSiS, sol, UnsoldSiS, EnvironSiS, p0, OldSoldPrim, xi, h; option remember; xi := 1; if alpha <= 1/(1+beta*xi) then p := max(`assuming`([solve(u*(psol-c+(psol-delta*v-sExp)*beta*xi)/(beta^2*xi^2*(psol-delta*v-sExp)/(1-alpha)-(beta^2*xi^2/(1-alpha)-(1+beta*xi)^2)*(psol-s)) = alpha*u*(v-psol)/(v-s), psol, useassumptions)], [0 < psol])); q := alpha*u*(v-p)/(v-s); G2 := (1/2)*beta^2*xi^2*q^2/(u*(1-alpha)^2); G3 := (1/2)*q^2*(1+beta*xi)^2/u; h := (p-delta*v-sExp)/(p-delta*v); FirmpfSiS := (p-c)*q+(p-s)*((1-alpha)*G2-G3)+h*(p-delta*v)*(beta*xi*q-(1-alpha)*G2); RecpfSiS := ((1-h)*(p-delta*v)-sExp)*(beta*xi*q-G2)+sExp*xi*q-cr*xi*q; UnsoldSiS := G3-(1-alpha)*G2; EnvironSiS := q+UnsoldSiS; OldSoldPrim := beta*xi*q-(1-alpha)*G2 else p := max(`assuming`([solve(u*(psol-c+(psol-delta*v-sExp)*beta*xi)/((psol-s)/u+beta^2*xi^2*(psol-delta*v-sExp)/(1-alpha)) = alpha*u*(v-psol)/(v-s), psol, useassumptions)], [0 < psol])); q := alpha*u*(v-p)/(v-s); F1 := beta*xi*q/(u*(1-alpha)); G1 := (1/2)*q^2/(u*alpha^2); G2 := (1/2)*beta^2*xi^2*q^2/(u*(1-alpha)^2); G3 := (1/2)*q^2*(1+beta*xi)^2/u; h := (p-delta*v-sExp)/(p-delta*v); FirmpfSiS := (p-c)*q-alpha*(p-s)*G1+h*(p-delta*v)*(beta*xi*q-(1-alpha)*G2); RecpfSiS := ((1-h)*(p-delta*v)-sExp)*(beta*xi*q-G2)+sExp*xi*q-cr*xi*q; UnsoldSiS := alpha*G1; EnvironSiS := q+UnsoldSiS; OldSoldPrim := beta*xi*q-(1-alpha)*G2 end if; return p, q, FirmpfSiS, RecpfSiS, EnvironSiS, h, UnsoldSiS, OldSoldPrim, xi end proc

NULL

NULLNULL

FirmModelH := proc (alpha, beta, delta, h) local q, p, pr, FirmpfSiS, F1, G1, G2, G3, RecpfSiS, sol, UnsoldSiS, EnvironSiS, p0, OldSoldPrim, xi; option remember; xi := 1; if alpha <= 1/(1+beta*xi) then p := max(`assuming`([solve(u*(psol-c+h*(psol-delta*v)*beta*xi)/(beta^2*xi^2*h*(psol-delta*v)/(1-alpha)-(beta^2*xi^2/(1-alpha)-(1+beta*xi)^2)*(psol-s)) = alpha*u*(v-psol)/(v-s), psol, useassumptions)], [0 < psol])); q := alpha*u*(v-p)/(v-s); G2 := (1/2)*beta^2*xi^2*q^2/(u*(1-alpha)^2); G3 := (1/2)*q^2*(1+beta*xi)^2/u; FirmpfSiS := (p-c)*q+(p-s)*((1-alpha)*G2-G3)+h*(p-delta*v)*(beta*xi*q-(1-alpha)*G2); RecpfSiS := ((1-h)*(p-delta*v)-sExp)*(beta*xi*q-G2)+sExp*xi*q-cr*xi*q; UnsoldSiS := G3-(1-alpha)*G2; EnvironSiS := q+UnsoldSiS; OldSoldPrim := beta*xi*q-(1-alpha)*G2 else p := max(`assuming`([solve(u*(psol-c+h*(psol-delta*v)*beta*xi)/((psol-s)/u+beta^2*xi^2*h*(psol-delta*v)/(1-alpha)) = alpha*u*(v-psol)/(v-s), psol, useassumptions)], [0 < psol])); q := alpha*u*(v-p)/(v-s); F1 := beta*xi*q/(u*(1-alpha)); G1 := (1/2)*q^2/(u*alpha^2); G2 := (1/2)*beta^2*xi^2*q^2/(u*(1-alpha)^2); G3 := (1/2)*q^2*(1+beta*xi)^2/u; FirmpfSiS := (p-c)*q-alpha*(p-s)*G1+h*(p-delta*v)*(beta*xi*q-(1-alpha)*G2); RecpfSiS := ((1-h)*(p-delta*v)-sExp)*(beta*xi*q-G2)+sExp*xi*q-cr*xi*q; UnsoldSiS := alpha*G1; EnvironSiS := q+UnsoldSiS; OldSoldPrim := beta*xi*q-(1-alpha)*G2 end if; return p, q, FirmpfSiS, RecpfSiS, EnvironSiS, h, UnsoldSiS, OldSoldPrim, xi end proc

NULL

NULL

NULL

NULL

NULL

NULL

NULL

diffr1 := proc (alpha, delta) if not [alpha, delta]::(list(numeric)) then return ('procname')(args) end if; FirmModelPP(alpha, delta)[3]-FirmModelHmax(alpha, .2, delta)[3] end proc

diffr2 := proc (alpha, delta) if not [alpha, delta]::(list(numeric)) then return ('procname')(args) end if; FirmModelFC(alpha, delta)[3]-FirmModelHmax(alpha, .2, delta)[3] end proc

diffr3 := proc (alpha, delta) if not [alpha, delta]::(list(numeric)) then return ('procname')(args) end if; FirmModelFC(alpha, delta)[3]-FirmModelPP(alpha, delta)[3] end proc

P1 := implicitplot(diffr1, 0 .. 1, 0 .. 1, color = gray, thickness = 1)

P2 := implicitplot(diffr2, 0 .. 1, 0 .. 1, color = black, thickness = 1)

P3 := implicitplot(diffr3, 0 .. 1, 0 .. 1, color = pink, thickness = 1)

``

``

 

 

NULL

``

NULL

P7 := inequal({diffr1(alpha, delta) > 0, diffr2(alpha, delta) > 0, diffr3(alpha, delta) > 0}, alpha = 0 .. 1, delta = 0 .. 1, color = "LightBlue")

P8 := inequal({diffr1(alpha, delta) > 0, diffr2(alpha, delta) > 0, diffr3(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = yellow)``

P9 := inequal({diffr1(alpha, delta) > 0, diffr3(alpha, delta) > 0, diffr2(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = cyan)

P10 := inequal({diffr1(alpha, delta) > 0, diffr2(alpha, delta) < 0, diffr3(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = grey)

P11 := inequal({diffr2(alpha, delta) > 0, diffr3(alpha, delta) > 0, diffr1(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = green)

P12 := inequal({diffr2(alpha, delta) > 0, diffr1(alpha, delta) < 0, diffr3(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = red)

P13 := inequal({diffr3(alpha, delta) > 0, diffr1(alpha, delta) < 0, diffr2(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = pink)

P14 := inequal({diffr1(alpha, delta) < 0, diffr2(alpha, delta) < 0, diffr3(alpha, delta) < 0}, alpha = 0 .. 1, delta = 0 .. 1, color = coral)

NULL

display(P7, P8, P9, P10, P11, P12, P13, P14, textplot([.2, .9, "some text"]), scaling = constrained, view = [0 .. 1, 0 .. 1], labels = [alpha, delta])

 

``


 

Download Compare_three_regions.mw

the final plot does not look reasonable. Would you please guide me?

This worksheet contains an unnamed theorem on page 202 of David Wells's book The Penguin Dictionary of Curious and Interesting Geometry.

Somehow I have uploaded both its contents and (a) link(s) to it.

What Maple code can animate and display, in turn, each of the portrayed pursuit paths?

Pursuit_problem.mw

 

Consider a target point T which moves at constant speed along a straight line, and a moving point P which at all times moves directly towards T. If P starts anywhere on the outermost ellipse, and T starts from a focus of the outer ellipse, then P always captures T at the same point, the centre of the ellipse.

 

``

 

The concentric ellipses, whose shape depends on the relative velocities of T and P, are isochrones, and the curves of pursuit are their isoclinal trajectories

 

Download Pursuit_problem

Please how can I export a matrix from maple to matlab

A := Matrix(5, 5, {(1, 1) = -.841752461600000, (1, 2) = -71.7787800100000, (1, 3) = 0.701877157500000e-2, (1, 4) = 0.672783592200000e-2, (1, 5) = 0.646005759700000e-2, (2, 1) = -.877557898000000, (2, 2) = -100., (2, 3) = 0.701617590500000e-2, (2, 4) = 0.672545092900000e-2, (2, 5) = 0.645785863600000e-2, (3, 1) = -1.00426692300000, (3, 2) = -.677765381900000, (3, 3) = 0.700840041000000e-2, (3, 4) = 0.671830608400000e-2, (3, 5) = 0.645127072200000e-2, (4, 1) = -1.31039754100000, (4, 2) = -.820833777300000, (4, 3) = 0.699547946600000e-2, (4, 4) = 0.670643167900000e-2, (4, 5) = 0.644032067900000e-2, (5, 1) = -2.17574621300000, (5, 2) = -1.15959068100000, (5, 3) = 0.697746998200000e-2, (5, 4) = 0.668987785500000e-2, (5, 5) = 0.642505292600000e-2})

I tried

ExportMatrix(matlabData, A, target=MATLAB,format=rectangular,mode=ascii);

 but didn't work. 


 

NULL

restart:

Digits:=15;

15

A:=Matrix(4,4,[[-1,2,0,0],[2,-1,2,0],[0,2,-1,2],[0,0,1,-1]],datatype=float[8],storage=sparse);

Matrix(4, 4, {(1, 1) = -1.0000000000000000, (1, 2) = 2.0000000000000000, (1, 3) = 0., (1, 4) = 0., (2, 1) = 2.0000000000000000, (2, 2) = -1.0000000000000000, (2, 3) = 2.0000000000000000, (2, 4) = 0., (3, 1) = 0., (3, 2) = 2.0000000000000000, (3, 3) = -1.0000000000000000, (3, 4) = 2.0000000000000000, (4, 1) = 0., (4, 2) = 0., (4, 3) = 1.0000000000000000, (4, 4) = -1.0000000000000000})

b:=Vector(4,[1,0.,0,0],datatype=float[8]):

 

sol:=LinearAlgebra:-LinearSolve(A,b,method=SparseDirectMKL);

Error, invalid input: LinearAlgebra:-LinearSolve expects value for keyword parameter method to be of type identical(none,SparseLU,SparseDirect,SparseDirectMKL,SparseIterative,LU,QR,solve,hybrid,Cholesky,subs,modular), but received SparseDirectMKL

NULL


 

Download buglinearsolve.mw

I was pleased to see the description of SparseDirectMKL, but it is not implemented properly yet. It is a step in the right direction, so please make this available in the near future

 

Hello everyone. after runnig this maple code i get the error :" Error, (in Optimization:-NLPSolve) non-numeric result encountered" . How can fix it?

restart;
Digits := 20;
with(LinearAlgebra);
with(linalg);
with(Optimization);
with(Student[Calculus1]);
NULL;
n := 2;
z := 1;
a := 0;
b := 1;
m := 2;
NULL;
PS1 := (j, t) -> piecewise(j = 0, 1, t^(j + s[j]));
PI1 := (j, t) -> piecewise(j = 0, 1, t^(j + q[j]));
PH1 := (j, t) -> piecewise(j = 0, 1, t^(j + h[j]));
PL1 := (j, t) -> piecewise(j = 0, 1, t^(j + l[j]));
NULL;
PS := t -> local j; Transpose(convert([seq(PS1(j, t), j = 0 .. n - 1)], Matrix));
P_I := t -> local j; Transpose(convert([seq(PI1(j, t), j = 0 .. n - 1)], Matrix));
PH := t -> local j; Transpose(convert([seq(PH1(j, t), j = 0 .. n - 1)], Matrix));
PL := t -> local j; Transpose(convert([seq(PL1(j, t), j = 0 .. n - 1)], Matrix));
Warning, (in PS) `j` is implicitly declared local
Warning, (in P_I) `j` is implicitly declared local
Warning, (in PH) `j` is implicitly declared local
Warning, (in PL) `j` is implicitly declared local


NULL;
NULL;
B1 := (i, j) -> piecewise(i = j and j = 1, 1, i = 1 and 1 < j, 0, i = j and j = 2, 1, i = 2 and 2 < j, 0, j <= i, (i + j - 2)!/(2^(j - 1)*(j - 1)!*(i - j)!));
NULL;

B := t -> Matrix(n, B1);

DS1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + s[k - 1])/GAMMA(k + s[k - 1] - z));
DI1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + i[k - 1])/GAMMA(k + i[k - 1] - z));
DH1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + h[k - 1])/GAMMA(k + h[k - 1] - z));
DL1 := (m, k) -> piecewise(m <= 1, 0, m = k, GAMMA(k + l[k - 1])/GAMMA(k + l[k - 1] - z));
DS := t -> t^(-z)*Matrix(n, DS1);
DI := t -> t^(-z)*Matrix(n, DI1);
DH := t -> t^(-z)*Matrix(n, DH1);
DL := t -> t^(-z)*Matrix(n, DL1);
NULL;
NULL;

cs := i -> ps[i];
ci := j -> p[j];
ch := j -> ph[j];
cl := i -> pl[i];
CS := convert([seq(cs(i), i = 1 .. n)], Matrix);
CI := convert([seq(ci(i), i = 1 .. n)], Matrix);
CH := convert([seq(ch(i), i = 1 .. n)], Matrix);
CL := convert([seq(cl(i), i = 1 .. n)], Matrix);

NULL;
NULL;
NULL;
S := unapply(simplify(Multiply(Multiply(CS, B(t)), PS(t))[1, 1]), [t]);
I1 := unapply(simplify(Multiply(Multiply(CI, B(t)), P_I(t))[1, 1]), [t]);
H := unapply(simplify(Multiply(Multiply(CH, B(t)), PH(t))[1, 1]), [t]);
L := unapply(simplify(Multiply(Multiply(CL, B(t)), PL(t))[1, 1]), [t]);
DSS := unapply(simplify(Multiply(Multiply(Multiply(CS, B(t)), DS(t)), PS(t))[1, 1]), [t]);
DII := unapply(simplify(Multiply(Multiply(Multiply(CI, B(t)), DI(t)), P_I(t))[1, 1]), [t]);
DHH := unapply(simplify(Multiply(Multiply(Multiply(CH, B(t)), DH(t)), PH(t))[1, 1]), [t]);
DLL := unapply(simplify(Multiply(Multiply(Multiply(CL, B(t)), DL(t)), PL(t))[1, 1]), [t]);
NULL;

NULL;
RS := unapply(evalf(DSS(t) + (-0.0043217^z + 0.5944^z*Multiply(S(t), I1(t)) + (0.025^z + 0.0008^z)*S(t))), [t]);

RI := unapply(evalf(DII(t) + (-0.5944^z*Multiply(S(t), I1(t)) - 0.0056^z*Multiply(H(t), I1(t)) - 0.027^z*L(t) + (((0.025^z + 0.0008^z) + 0.025^z) + 0.5^z)*I1(t))), [t]);
RH := unapply(evalf(DHH(t) + (-0.535^z + 0.0056^z*Multiply(H(t), I1(t)) - 0.5^z*I1(t) + (0.025^z + 0.0008^z)*H(t))), [t]);
RL := unapply(evalf(DLL(t) + (-0.025^z*I1(t) + (0.025^z + 0.0008^z + 0.027^z)*L(t))), [t]);
R := unapply(evalf(RS(t)^2 + RI(t)^2 + RH(t)^2 + RL(t)^2), [t]);

NULL;

p1 := x -> (x^2 - 1)^m;
dmp1 := x -> diff(p1(x), x $ m);
NULL;
p := x -> dmp1(x)/(2^m*m!);
eq := p(x) = 0;
r := solve(eq, x);
NULL;
ss := Vector[row](m);
w := Vector[row](m);
for i to m do
    w[i] := 2/((-r[i]^2 + 1)*D(p)(r[i])^2);
    ss[i] := w[i]*evalf(R((b - a)/2*r[i] + (b + a)/2));
end do;


SS := add(ss);

Lambda := evalf((b - a)/2*SS);
;

C1 := S(0) - 43994 = 0;
C2 := I1(0) - 0.1 = 0;
C3 := H(0) = 0;
C4 := L(0) - 1 = 0;

NULL;
NLP := NLPSolve(Lambda, {C1, C2, C3, C4});
Error, (in Optimization:-NLPSolve) non-numeric result encountered

 

Hi,

It might be really trivial, but I am struggling in the algebraic manipulation of the argument of the exponential function. As an example, I want to substitute 

I*T[0]*(omega1-2*omega2) = I*omega2*T[0]-I*si*T[2]

in the expression of

exp(-I*T[0]*(omega1-2*omega2)).

However, I am only able to do so by subs command and also by exactly copying the argument in the following manner.

subs(-I*T[0]*(omega1-2*omega2) = I*omega2*T[0]-I*si*T[2], exp(-I*T[0]*(omega1-2*omega2)))

The issue is I have expressions like this all over in the main problem, and I have to copy-paste such expressions for the substitution. So I am wondering if there is a more efficient way to tackle this problem. 

Thanks in Advance,

Regards

I am trying to determine constraints for a,b,c that are real, such that the eigenvalues of my system matrix have all negative real part.

restart;
with(LinearAlgebra):
assume(a,'real');
assume(b,'real');
assume(c,'real');
A:=<c,0,0;0,-1,a;0,b,-1>
elist:=Eigenvalues(A):
map(lprint,elist):
c
-1+(b*a)^(1/2)
-1-(b*a)^(1/2)

If all eigenvalues real part must be less than 0, then clearly:

c < 0

ab < 1

However, when trying to verify these results with "is" and "coulditbe" Maple gives me blatantly false results:

additionally(c<0)
additionally(a*b<1)
is(Re(-1+sqrt(a*b))<0)
                             false

coulditbe(Re(-1+sqrt(a*b))>0)
                              true


The real part of -1+sqrt(a*b) can never be greater than 0 under the assumption that ab<1. So why is Maple giving me nonsense? Am I using the commands incorrectly?

Hi, I am completely new to Maple and I keep getting this message:

Error, invalid input: rhs received 19715.18184, which is not valid for its 1st argument, expr

my code is:

sqq:=Vector(n):
for i from 1 by 1 to n do


pom:=eval(sigma[qq],[K=0.5,Fred=0,Phi[a]=0.8,Phi[p]=0.2,camax=300000,Kmin=0.5,co=11230,c11=6120,c12=12710,c21=14.17,c22=6.61,c13=9270,c23=16.16,c14=9270,c24=16.16,g=0.745430443,R=0.00652,H=0.00081,l=2,P=Pload[i],lambda[Q]=lQres1[i], lambda[Z]=lZres1[i]]):

sqq[i]:=rhs(pom):

end do:

I am trying to get a vector sqq solving the equation sigma[qq] using the constants and vectors written there. Can anybody help me please?

While Maple itself is a pleasure to work with, the multitude and persistance of bugs in the Units package doesn't stop to surprise.

Especially as the same bugs come up again and again, after having been fixed i older versions.

In general, working with units and 0 is a pain in the ass. And this one doesn't even need a unit to compare with.

This one works in Maple 2022 - does not work in Maple 2023.

with(Units[Simple]);
min(0, 0);

Hi, 

Im trying to solve a system of 4 non-linear equations using the fsolve function. When i compute the command i seemingly dont get an answer to the system. Maple only prompts the command itself, can any of you locate my mistake or give any input on how to solve the issue. 

My code is as follows: 

restart;
r__C := 400;
r__D := 600;
r__E := 800;
a := 100;
p := 0.7;
q := Pi*a^2*p;
h__eq := 0.9*h__1*(E__1/E__2)^(1/3);
R__Ceq := sqrt(h__eq^2 + r__C^2);
R__C := sqrt(r__C^2 + h__1);
R__Deq := sqrt(h__eq^2 + r__D^2);
R__D := sqrt(r__D^2 + h__1);
R__Eeq := sqrt(h__eq^2 + r__E^2);
R__E := sqrt(r__C^2 + h__1);


eqC := 174.5*10^(-3) = q*(1 + nu)/(2*Pi*E__2*R__Ceq)*(2*(1 - nu) + h__eq^2/R__Ceq^2) + q*(1 + nu)/(2*Pi*E__1*r__C)*(2*(1 - nu) + 0) - q*(1 + nu)/(2*Pi*E__1*R__C)*(2*(1 - nu) + h__1^2/R__C^2);
eqD := 151.7*10^(-3) = q*(1 + nu)/(2*Pi*E__2*R__Deq)*(2*(1 - nu) + h__eq^2/R__Deq^2) + q*(1 + nu)/(2*Pi*E__1*r__D)*(2*(1 - nu) + 0) - q*(1 + nu)/(2*Pi*E__1*R__D)*(2*(1 - nu) + h__1^2/R__D^2);
eqE := 133.2*10^(-3) = q*(1 + nu)/(2*Pi*E__2*R__Eeq)*(2*(1 - nu) + h__eq^2/R__Eeq^2) + q*(1 + nu)/(2*Pi*E__1*r__E)*(2*(1 - nu) + 0) - q*(1 + nu)/(2*Pi*E__1*R__E)*(2*(1 - nu) + h__1^2/R__E^2);
eqA := 401.7*10^(-3) = 2*q*a*(-nu^2 + 1)*(sqrt(1 + (h__eq/a)^2) - h__eq/a)/E__2 + 2*(-nu^2 + 1)*q*a/E__1 - 2*q*a*(-nu^2 + 1)*(sqrt(1 + (h__1/a)^2) - h__1/a)/E__1;


fsolve({eqA, eqC, eqD, eqE}, {E__1, E__2, h__1, nu}, {E__1 = 0 .. 5000, E__2 = 0 .. 5000, h__1 = 0 .. 1000, nu = 0 .. 0.5});
 

 

Picture for refference: 

Hi,

I am using A:=LinearAlgebra:-RandomMatrix(10,10,generator=-10..10) to generate a random matrix. How may I specify that every row of A has at least three non-zero entries? 

Thanks!

The attached worksheet shows a simple operator to calculaute the cartesian product of a set. The code is executed in both 1D and 2D notation in the worksheet.  The code is also placed in a code edit region and in the startup code area if the worksheet.  When entered into a worksheet is either notation, it produces an error message,  Without the local designation, it executes with a warning message. When entered into a code edit region it executes without error or warning.

I assume that this behavior reflects a limitation of the 2d notation or is there a workaround to the problem?

error4.mw

For instance, given nine integer x1, x2, …, x9 satisfying x1, x2, …, x9 ≥ -5 and x13x23+…+x93=0, the goal is to maximize x1 + x2 + … + x9. However, according to Optimization/Options,  is not accepted by the Optimization:-Maximize command. A probable method is applying floor into the optimization variables; unfortunately, I can only get: Error, (in Optimization:-NLPSolve) no improved point could be found

(*restart;*)
vars := [x || (1 .. 9)]:
Optimization:-Maximize(`?()`(`+`, floor~(expr)), [add(floor~(expr) ^~ 3) = 0, expr[] >=~ -5], initialpoint = (unapply~(expr) =~ rand(-5 .. 10))()); # Alternatives to exhaustive search?
Error, (in Optimization:-NLPSolve) no improved point could be found

Is there any workaround to solve this problem? 

First 87 88 89 90 91 92 93 Last Page 89 of 2338