## Help!! My maple file got corrupted....

Can anyone help me fix a corrupted maple file?

I have tried to fix it myself and searched all over for a solution but can' seem to fix it myself. Please help

## Hidden code in Math applications and how to find i...

Stupid question, but how do I get the code on the math apps CaesarCipher from the help page?  I see the variable cipher but it's content is a mystery.

(Sorry guys, I changed the title to better reflect the content of the question and it bumped back up the top)

## Pick from excel sheet and apply regular regression...

1) Say I have an Excel sheet with first column with my dependent variable values Y

2) Remaining columns to the left say some maximum 30 columns are independent variable

One thing is to import the excel columns to maple matrix

Then matrix will have first column dependent variable

Another's independent variables

3) Now i need to pick 2 independent variables columns and ( the dependent variable columns say Y which is the first column)

4) apply the normal regular MLR regression on it  then check if R^2 is good the p vaule are below 0.05

5) I print the column names of those columns

The first row will be the header column which has the variable name.

## How to optimize an expression with conditional mea...

Hello everyone,

Here is a stylized version of my problem. Given three normally distributed random variables {A, B, C}, I want to find the X_1, X_2, X_3 that maximize the following expression (gamma being a constant and A being a linear combination of other normally distributed random variables):

Max{ Exp[A|B,C] - (gamma/2)*Var[A|B,C] }

All the details are here: 070423_Optimization.mw

In particular, I am seeking your help to:

1. Correlate three random variables (an example of the procedure for correlating two random variables is already provided in the script).
2. Verify my understanding of the linear projection theorem (https://stats.stackexchange.com/questions/30588/deriving-the-conditional-distributions-of-a-multivariate-normal-distribution) in two dimensions, that is, to compute conditional means and variances of the form E[X|Y,Z] and V[X|Y,Z].
3. Implement and adapt the linear projection theorem to my problem in Maple.
4. Combine all together to obtain Expr = E[A|B,C] + V[A|B,C] and find the optimal {X_1, X_2, X_3} by solving the linear system of three equations in the three variables {X_1, X_2, X_3}, where the three equations are obtained by setting to 0 the partial derivatives of Expr with respect to {X_1, X_2, X_3}.

In relation to point 2., did I correctly interpret the matrix form of the three-dimensions version of the linear projection theorem?   In relation to point 3., I attach a stylized script for the three-dimensions version (note that I need the two-dimensions version for my problem): LinearProjectionTheorem_3dimensions.mw. Assuming a correct interpretation of the theorem:

• Did I correctly implement E[X_2|Y_1,Y_2,Y_3] and E[X_3|Y_1,Y_2,Y_3] as in the picture above?
• How to adapt it accordingly to include E[X_1|Y_1,Y_2,Y_3] and V[X_1|Y_1,Y_2,Y_3], V[X_2|Y_1,Y_2,Y_3], and V[X_3|Y_1,Y_2,Y_3]?
• How to apply it to the random variables in my script to eventually find the optimal {X_1,X_2,X_3}?

You can play around with my script 070423_Optimization.mw and send me the updated version. The problem I am trying to solve is quite convoluted, so let me know if you need any further clarification. Thanks a lot!

## what is the correct way to define a function with ...

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)    (1)  (2)  (3)  (4)       (5) ## How often does 2022.1 gets updated?...

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!

## plotting ellipse...

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 ## how to calculate this sum correctly...

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.

## Why can't Maple check if 'm' is positive?...

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

 > > _EnvTry := hard: (1)
 > > >   (2)
 >  (3)
 > Does anyone know why?

## How can I obtain this result?...

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
f(a, t) + f(b, t)
```

TIA

## Problem in solving a differential equation...

I receive the following error when I run maple to solve a diff equation.

 > 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)));      > ## Why does my code return a blank?...

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

 >  (1)

## Solve result. ...

What is the result of the following?

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

## Opening Maple V R5 documents with "right click ope...

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.

## Why is the SMTLIB['Satisfy'] command incompatible ...

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

 > interface(version);
 > restart; (1)
 >  (2)
 > (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)
 >  (3)
 > (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)

?SMTLIB:-Satisfy

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?