9 years, 7 days

## Command to the right of the expression...

Maple 2019

Is there any way to place a command to the right of an expression to perform a task? Because I only know the way that puts the command to the right.A simple example:

w1 := simplify(sin(x)2 + cos(x)2);

w1:=1

w2:=sin(x)2+cos(x)2:-simplify;
Error, invalid module reference

I wonder if there is a way to put the commands, also to the right of the expressions, as above.

Thank you,

Oliveira

## Creating styles...

Maple

I would like to change the color and font type on the Maple-2019 inputs and outputs, so that these formatting would be applied every time I started a new document. I tried doing this through the Styles option on the Format menu, but I could not. Can anyone help? Thank you.

Maple

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >

## Solve - symbolic x numerical...

When the solution is obtained in symbolic form, and then numeric values are assigned to variables, the answer is different from the numerical solution.

vol := -R^2*Pi*H*(-3*R*C^2*sin(theta)-3*H^2*cos(theta)^2*sin(theta)*R+6*R*C*sin(theta)*cos(theta)*H-sin(theta)*R^3+sin(theta)*R^3*cos(theta)^2+C^3-3*C^2*cos(theta)*H-cos(theta)^3*H^3+3*H^2*C*cos(theta)^2+3*R^2*H*cos(theta)^3+3*R^2*C-3*R^2*H*cos(theta)-3*cos(theta)^2*R^2*C)/(3*(H^2*cos(theta)^2-R^2+cos(theta)^2*R^2)^(3/2)):

V := (1/3)*Pi*R^2*H:

vp := Pi*h*R^2*(3*H^2-3*H*h+h^2)/(3*H^2):

eq := V-vp = vol;

va := theta = (1/6)*Pi, R = 2, H = 20, h = 14;

Symbolic solution:
sc := solve(eq, [C]);
evalf(subs(va, sc));
[[C = 18.36540754], [C = 18.29805834 + 0.03888407898 I],  [C = 18.29805834 - 0.03888407898 I]]

Numerical solution:
eq1 := subs(va, eq);
evalf(solve(eq1, [C]));
[[C = 20.91425055 + 4.492493739 I], [C = 20.91425055 - 4.492493739 I], [C = 13.13302314]]

Why this happens?
I am grateful for your attention.
Sinval Oliveira Santos.

## Discrete probability distribution...

How to build a discrete probability distribution with the function with two variables below?

ff := (x,y)->piecewise(x = 0 and y = 0, 1/8, x = 0 and y = 1, 1/6, x = 1 and y = 0, 1/3, x = 1 and y = 1, 3/8);