MaplePrimes Questions

Actually, I have two questions here, I don't know if they are connected.

I don't know if it's the right way to deifne function with indexed variables, is there any difference between f and g?

I assume they are the same since neither of them work with Maximize.

Finally, I use the most original way in (5), why give the wrong answer? (no way the answer is -infinity)

restart

f := proc (x) options operator, arrow; sum(ln(x[i]), i = 1 .. 4) end proc

proc (x) options operator, arrow; sum(ln(x[i]), i = 1 .. 4) end proc``

(1)

g := proc (x) options operator, arrow; ln(x[1])+ln(x[2])+ln(x[3])+ln(x[4]) end proc

proc (x) options operator, arrow; ln(x[1])+ln(x[2])+ln(x[3])+ln(x[4]) end proc

(2)

f([1, 1, 1, 1])

0

(3)

cons := {x[1]+x[2] <= 1, x[1]+x[3] <= 2}

{x[1]+x[2] <= 1, x[1]+x[3] <= 2}

(4)

with(Optimization)

Maximize(f, cons, assume = nonnegative)

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of  procedures

 

Maximize(f, {x[1]+x[2] <= 1, x[1]+x[3] <= 2}, assume = nonnegative)

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of  procedures

 

Maximize(g, cons, assume = nonnegative)

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of  procedures

 

Maximize(g, {x[1]+x[2] <= 1, x[1]+x[3] <= 2}, assume = nonnegative)

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of  procedures

 

 

Maximize(sum(ln(x[i]), i = 1 .. 4), {x[1]+x[2] <= 1, x[1]+x[3] <= 2}, assume = nonnegative)

[Float(-infinity), [x[1] = HFloat(1.0), x[2] = HFloat(0.0), x[3] = HFloat(1.0), x[4] = HFloat(1.0)]]

(5)

NULL

Download mre.mw

In the last two months I've have been asked to download an update to 2022.1 around 7 times.

Each oupdates takes 5-10 minutes and I have to sit idle.

1. Is this the typical pace of updates?

2.Is there a veriosn 2023 I need to get? if yes, how?

Thanks!

i try to plot this equation        2.96736996560705*10^(-12)*p^2+1.31319840299485*10^(-13)*t^2-8.89549693662593*10^(-7)*p+8.53128393394231*10^(-7)*t-3.65558815509970*10^(-30)*p*t-1 = 0 and use this command plots:-implicitplot(TWeq, p = -10^10 .. 10^11, t = -3*10^8 .. 3*10^8, gridrefine = 3, scaling = constrained, size = [1000, 100]) but  it only shows like this

it should be an ellipse but it just show like this..please help me.

S1 := 441;
S2 := 1109;
S3 := 511;
S4 := 900;
S5 := 2904;
S6 := 285;

S2 + S3 + S4 + S5 + S6;                             
for i to 5 do
    S*[i] + S[i + 1];
end do;
Thank you.

The following results should be true or false, but unfortunately, both of them become FAIL (in Maple 2023): 

interface(version)

_EnvTry := hard:

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

(1)

assume(`or`(n < 0, n >= 1), m > (1/2)*n*(n-1))

is(m < 0);

is(m > 0)

false

 

FAIL

(2)

coulditbe(m, 0)

FAIL

(3)

NULL


Download Unable_to_prove.mw

Does anyone know why?

Is there a simpler and more elegant way to get the last result in this code snippet?

add(f~([op(a+b)])[]);
                          f(a) + f(b)
# simpler and more elegant
map(f, a+b);
                          f(a) + f(b)
# now I want to obtain this result
add(f~([op(a+b)], t)[]);
                       f(a, t) + f(b, t) 

TIA

I receive the following error when I run maple to solve a diff equation.
Thank you in advance for your help.

eq1:=A__n=[X__n+[(C-z)*(tan(theta1)+tan(theta2))]] * [B + (2*(C-z)*tan(theta3))];
eq2:=P__n=[2*(X__n+B)] + 2 * (C-z) * [(tan(theta1)+tan(theta2)) + (2*tan(theta3))];
eq3:=gamma - [cu*(P__n/A__n)] = diff(sigma__v(z),z);
eq4:=subs([eq1,eq2],eq3);
ics:=sigma__v(0)=sigma__s;
sol:=simplify(dsolve(([eq4,ics]), sigma__v(z)));
NULL

A__n = [X__n+[(C-z)*(tan(theta1)+tan(theta2))]]*[B+2*(C-z)*tan(theta3)]

 

P__n = [2*X__n+2*B]+2*(C-z)*[tan(theta1)+tan(theta2)+2*tan(theta3)]

 

gamma+[-cu*P__n/A__n] = diff(sigma__v(z), z)

 

gamma+[-cu*([2*X__n+2*B]+2*(C-z)*[tan(theta1)+tan(theta2)+2*tan(theta3)])/([X__n+[(C-z)*(tan(theta1)+tan(theta2))]]*[B+2*(C-z)*tan(theta3)])] = diff(sigma__v(z), z)

 

sigma__v(0) = sigma__s

 

Error, (in PDEtools/NumerDenom) invalid input: `PDEtools/NumerDenom` expects its 1st argument, ee, to be of type algebraic, but received [tan(theta1)+tan(theta2)+2*tan(theta3)]

 

``

Download diffeq.mw

I've been trying for so long to fix my code I could've done the math by hand by now. All equations and variables seem to be recognized correctly. Can anyone point out where I made an error? Thanks

Chem.mw

restart; K1 := 10^(-2.12); K2 := 10^(-7.21); K3 := 10^(-12.32); Kw := 10^(-14); NaCl := .5004/(58.44); NaH2PO4 := .1092/(119.98); Na2HPO4 := 1.214/(141.96); Why := Kw = H*OH; Do := K1 = H*H2PO4/H3PO4; It := K2 = H*HPO4/H2PO4; Today := K3 = H*PO4/HPO4; When := Cl = NaCl; Its := Na = NaH2PO4+2*Na2HPO4+NaCl; Due := Na+H = Cl+3*PO4+2*HPO4+H2PO4+OH; Tomorrow := Na2HPO4+NaH2PO4 = H3PO4+H2PO4+HPO4+PO4; z := solve([Why, Do, It, Today, When, Its, Due, Tomorrow], [H, OH, Na, CL, PO4, HPO4, H2PO4, H3PO4]); assign(z)

[]

(1)

Download Chem.mw

What is the result of the following?

solve((4*t1+4*sqrt(t1^2-4*t2))>0,{t2});
 

This happened on Windows 10 clicking on *.mws documents while Maple 2023 was not running.

My observations with one document (I do not have others at hand at the moment):

No freeze when Maple is already running.

No freeze when the startup page (Start.mw) is disabled.

Older versions opened in Windows file explorer with “right click and open with” did not show this behavior.

Since there are ways to open such old documents, my intention is to document my observations and to find out if others can reproduce it. If not, my setup might differ from default or the file has an issue.

Here is a demonstration involving two decision problems (where evalf is applied to the output for better readability): 
 

interface(version);

restart;

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

(1)

RealDomain:-solve({x*y = 3*z^5+4, x^2*y^2-3*x^2*z^2 = 1., x^3+y^3+z^3 = 12})

{x = 2.948903259, y = -2.257458014, z = -1.288554964}, {x = -.7294615910, y = 2.402430460, z = -1.139060479}, {x = .6177631401, y = 2.331476708, z = -.9687540923}, {x = 2.113678892, y = 1.450731881, z = -.7917893433}

(2)

SMTLIB:-Satisfy({x*y = 3*z^5+4, x^2*y^2-3*x^2*z^2 = 1, x^3+y^3+z^3 = 12}, showsmtlib)

(declare-fun x () Real)
(declare-fun y () Real)
(declare-fun z () Real)
(assert (and (= (* x y) (+ (* (* z z z z z) 3) 4)) (= (+ (* (* x x) (* y y)) (* (* (* x x) (* z z)) (- 3))) 1) (= (+ (* x x x) (* y y y) (* z z z)) 12)))
(check-sat)
(exit)

 

Error, (in SMTLIB:-smtlib_execute) external linking: error loading external library mplsmtlib.dll: Ҳ���ָ����ģ�顣

 

RealDomain:-solve({(x^2-2*y*z)*(x^3-y+z) = 0, x^4-y*z^3 = 2., z^4+x^3-2*x*y+3*y*z = 0})

{x = -1.130532018, y = -.1818551573, z = 1.263080805}, {x = 1.123233144, y = .4467032548, z = -.9704268675}, {x = 1.250562423, y = 2.517328867, z = .5615663246}, {x = 2.489770959, y = 16.73009962, z = 1.296110460}, {x = -1.336432744, y = -.7736167557, z = -1.154352246}, {x = 1.209937072, y = 1.655230257, z = .4422187526}

(3)

SMTLIB:-Satisfy({(x^2-2*y*z)*(x^3-y+z) = 0, x^4-y*z^3 = 2, z^4+x^3-2*x*y+3*y*z = 0}, showsmtlib)

(declare-fun x () Real)
(declare-fun y () Real)
(declare-fun z () Real)
(assert (and (= (* (+ (* x x) (* (* y z) (- 2))) (+ (* x x x) (* y (- 1)) z)) 0) (= (- (* x x x x) (* y (* z z z))) 2) (= (+ (* z z z z) (* x x x) (* (* x y) (- 2)) (* (* y z) 3)) 0)))
(check-sat)
(exit)

 

Error, (in SMTLIB:-smtlib_execute) external linking: error loading external library mplsmtlib.dll: Ҳ���ָ����ģ�顣

 

?SMTLIB:-Satisfy


 

Download SMTLIB[Satisfy].mw

As you can see, the SMTLIB:-Satisfy command fails to work in Maple 2023, and I have to install the Visual Studio 2013 (VC++ 12.0) manually. But unfortunately, even if I have installed the vcredist_x64.exe beforehand, the computation still cannot be done in 1000 seconds! (Please note that I just require one real instance rather than all solutions.) Does anyone know why? 
By the way, since the default SMT solver (in Maple 2023) is Z3, will another SMT solver (like cvc5) be supported in future Maple releases?

Hi,

I am trying to plot my G3 plan using the 'implicit3d' command so that I can insert it as an option in the background of my animation, but it's not working. Any suggestions? Thank you.

G2Ex4Blocage.mw

Inscribed square problem


I decided to check on this curve 
 

 4*(x1-0.25)^4-x1^2*x2^2+(x2-0.25)^4-1.21=0;


I get a very rough solution, because the difference between the sides of the "square" begins already at 1-2 decimal places. More precisely, it doesn’t work, that is, we can say that I personally could not find confirmation of the hypothesis.
The coordinates of the vertices of the square:

                    -0.4823584672, -0.2770841741

                    0.9883885535, -0.3959790155

                    1.108267478, 1.086941264

                   -0.3459185869, 1.219514527

Side lengths:
                          1.475544911

                          1.487757882

                          1.460216690

                          1.502805215


 


Perhaps someone would like to try.

yeah sorry it didnt want 2 send so i spamed the botten i didnt meen 2 send more than 1 

it could be amazing if u could help 

ty for the quick respons 

alle-maple_3.mw

Dear power users, I have a probably trivial question. How can I import the attached file in Maple? The file consists of a header part with below the header two columns with data. The file coming from a measuring device has no extension and I could not upload it to the forum as it was considered a null file. In order to solve this I gave it a .txt extension but keep in mind that this normally is not present.

Additional question: if the file would have several headers each time followed by 2 data columns, is there an easy way to separate them in a sort of automatic manner?

Spiking2011622.txt

First 215 216 217 218 219 220 221 Last Page 217 of 2429