Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

In this figure, y axis scale is -1, -0.5,0,0.5,1.

i need that scale -1, -0.1, -0.2 -0.3......1

how to change?

 

Any could you please help me to write program using for loop of 

U(0, h, m)=0 for h=1 .. 10, m=0..10.?

Hi!

If I have a list of numbers e.g, data:=[0,12,0,7,5,3,7,10,0,0,9,3,2,5,0,6]

How do I get Maple to count the values bigger or equal to seven? [ans=5]

 

nnnnnnnnnnnn.mwHi everyone

I am a student. I have a problem with making matrix in maple. please help me.

this is the cod that I wrote.

 

I uploded my cod and the picture of matrix that I want to create.

thanks

 

Hi,

I am trying to solve a differentiation but I think I am stuck since the solution is not what it should be.

So, I got the equation below

eq4 := `S__2 ` = sin(alpha - phi)*sin(-beta + alpha)*H^2*M/(2*sin(-beta - delta - phi + alpha)*sin(beta)*sin(alpha)) - S__1

And according to the paper I read, to get the maximum value of alpha for maximum value of S_2, I need to make differentiation to first derivative where dS_2/d(alpha) = 0

Then I should substitute back value of alpha to equation above and the paper shows that i should get equation below.

`S__2 ` = 1/2*M*K__a*H^2 - `S__2 `

where K_a is

`K__a`= [(sin(beta+phi))/((sin(beta))/(sqrt(sin(beta+delta))+(sqrt(sin(phi+delta)*(sin(phi-varepsilon)))/(sin(beta-varepsilon))))]

 

I know its really hard but hope someone can give some idea how to do it.

 

Thank you very much.

 

Kind regards

Faiz Farhan

 

Hi. Can someone solve for w as a general function of k, without RootOf

w^3+3w^3*(1-w)+6w^3*(1-w)^2=k, k constant

i tried

allvalues(solve(w^3+3*w^3*(1-w)+6*w^3*(1-w)^2-k,w))

and also with option explicit (edit)

 

 

Dear all, 

Would you allow me to ask a question?

What would be a way to re-write the 'eq2' in the following worksheet as 'eq_given'? The check, 'is...'. shows that two expressions are the same. 


 

restart;eq1:= (-k*I + 2*I + m)*sqrt(3) - 3*I*m - 3*k;

(-I*k+2*I+m)*3^(1/2)-(3*I)*m-3*k

(1)

eq2:=eq1 / 2;

(1/2)*(-I*k+2*I+m)*3^(1/2)-((3/2)*I)*m-(3/2)*k

(2)

eq_given:= (-sqrt(3)*I/2 - 3/2)*(k + I*m) + sqrt(3)*I;

(-((1/2)*I)*3^(1/2)-3/2)*(k+I*m)+I*3^(1/2)

(3)

is(eq_given - eq2 = 0);

true

(4)

 


Thank you, 

Download Q20200817.mw

Hi,

I am working on a project and really need help from you guys how to rearrange/factorize an equation. So I got a form of expression as shown below, where

W__1 + W__2 = -sin(-beta + alpha)*((H^2 - h^2)*gamma + h^2*psi)/(2*sin(beta)*sin(alpha))

 

How can I rearrange it into a similar form of

W__1 + W__2 = -H^2*sin(-beta + alpha)*((1 - h^2/H^2)*gamma + h^2*psi/H^2)/(2*sin(beta)*sin(alpha))

 

where I just bring out value of H^2? I realize it's very simple to do by hand but I just need to learn how to handle Maple for my work.

Really hope anyone can help me. Thank you very much for your time and assistance.

 

Kind regards

Faiz Farhan

 

 

I have some difficulties with exporting a 3d plot from Maple in a pdf format without loosing the whole settings. As a simple example consider the following.

plot3d(sin(x)*10^y, x = -4 .. 4, y = -2 .. 2, view = [-4 .. 4, -2 .. 2, 0 .. 2], labelfont = ["TimesNewRoman", 26], labels = [x, Typesetting:-Typeset(log[10](y)), typeset()])

I tried two approaches, each has a drawback.

1- Right clicking on the figure, choosing `Export`, then `PDF`. Unfortunately, Maple changes the font size of labels!

2- Right clicking on the figure, choosing `Export`, then `Encapsulated Postcript`. Then I open the resulted `eps` file in GSview. Convert it to pdf. The result is a large-size pdf file which is heavy to render. Even when it gets rendered, scrolling up and down (for example in Adobe reader) is not good, because it seems the picture is going to get rendered again!

So how should one export a 3d plot from Maple in a pdf format, But not loosing the settings of the plot such as the font size of the labels and also not ending up with a heavy file?

Hi,

I have a random variable that follows Uniform(1,4). Now I have a function which is of the following type:

g := a*alpha+b*t/alpha+exp(alpha)

where,

A := RandomVariable(Uniform(c, d));
                 RandomVariable(Uniform(c, d))
f := proc (alpha) options operator, arrow; PDF(A, alpha) end proc;
alpha -> PDF(A, alpha)
#Defining expectation fuction
E := proc (alpha) options operator, arrow; int(alpha*f(alpha), alpha = c .. d) end proc;
alpha -> int(alpha f(alpha), alpha = c .. d)
#g is a function of random variable α, where a and b are parameter

 

now I want to find the expectation of g and the first derivative of expectation of g,

E(g)

diff(E(g), t)

 

I understand the way I have defined E(alpha) is improper. But please understand my intent and help! here is the maple file also doubt_1.mw

How I can remove RootOf from the solution?

thanks.

root.mw

Given two metric equations, How can I find the transformation equation between these two metrices using maplesoft software?

Why in geom3d[FindAngle] we cannot get the value of the angle of a triangle greater than Pi / 2?
For example, I build a chord of a circle of unit radius along the sides of the triangle and calculate the center angle that corresponds to the given angle of the triangle. But it's not very convenient.
TR_ANGLE.mw

Is there any way to simplify this code?  even with small number at discretization this take forever to solve  :(

 

restart;


with(plots);

numero := 5;


# Valores Calculados / Retirados da internet


viscosidade := Vector[row](10, [0.000024, 0.00001113, 0.89*10^(-5), 0.00001779, 0.017299, 0.00001028, 0.927*10^(-5), 0.818*10^(-5), 0.749*10^(-5), 0.7*10^(-5)]);


H := Vector[row](8, [-0.1414243148*10^8, -0.1677843875*10^8, -0.2177577229*10^8, -0.3078557121*10^8, -0.4007777822*10^8, -0.4007777822*10^8, -0.5832487417*10^8, 0.84247483*10^7]);


a := [524, 879, 1271, 1099, 1779, -163, 241, -258, 1200, 1200];

b := [1.3383, 4.1117, 0.8467, -0.47, 0.0333, 6.78, 5.6683, 7.5933, 3, 3];
c := [-0.0008, 0.00015, -0.00145, 0.00105, 0.0008, -0.00475, -0.002, -0.00455, 0, 0];
d := [0.166667*10^(-6), -0.666667*10^(-6), 0.833333*10^(-6), -0.5*10^(-6), -0.333333*10^(-6), 0.15*10^(-5), 0.166667*10^(-6), 0.116667*10^(-5), -0.888178*10^(-15), -0.888178*10^(-15)];

Massas := Vector[row](10, [44.01, 16.04, 2.02, 28.01, 18.01, 28.05, 30.07, 44.1, 58.12, 84]);

nu := Matrix(11, 8, [[-1, -2, -2, -3, -4, -4, -6.05, -1], [-3, -4, -5, -7, -9, -9, -12.23, 1], [1, 2, 2, 3, 4, 4, 6.05, -1], [1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1]]);

A := Vector[row](8, [65.56165, 0.045, 0.001144, 0.119*10^(-5), 0.184*10^(-9), 0.659*10^(-8), 0.198*10^(-7), 0.0000378]);
E := Vector[row](8, [83523.900, 65017, 49782, 34885.500, 27728.900, 25730.100, 23564.300, 58826.300]);
m := Vector[row](8, [0.60950, 0.37330, -0.02830, 0.43540, 0.03530, -0.25150, 0.81870, -0.36200]);
n := Vector[row](8, [-0.46790, -0.26130, 0.19130, 0.08760, 1.11630, 0.00920, 0.03420, 1.26390]);

Conc[CO] := 40.65;
Conc[H2] := 78.91;
Conc[N2] := 119.5;

DensidadeCO := 6.712;
DensidadeN2 := 6.736;
DensidadeH2 := 0.0483;

Cpcte := [1.064, 14.51, 1.954, 2.889, 2.227, 2.596, 2.583, 2.619, 2.619, 2.619, 0.856, 1.056];
viscosidade := Vector[row](12, [0.0000252, 0.0000252, 0.0000252, 0.0000163, 0.0000154, 0.0000154, 0.0000154, 0.0000154, 0.0000154, 0.000023, 0.000023, 0.0000251]);
massas := Vector[row](12, [0.02801, 0.00202, 0.01801, 0.01604, 0.02805, 0.03007, 0.0441, 0.05812, 0.05812, 0.084, 0.04401, 0.02801]);

#Constantes
Rcte := 8.314;
varepsilon[B] := 0.4;
beta := 0.255;
phi := 4/3;
delta[wall] := 0.004;
lambda[wall] := 60;
h[water] := 1000;
Temp[water] := 498;
rho[B] := 380;
dt := 0.0157;
dp := 0.00015;


#Equações Auxiliares
for k to 11 do
    Y[k](t, z) := Rcte*C[k](t, z)*T(t, z)/1000000;
end do;

Cp[mix] := (t, z) -> 1000*Cpcte[12];
mu[mix] := (t, z) -> viscosidade[12];
M[mix] := (t, z) -> massas[12];


h[int] := (t, z) -> rho[mix](t, z)*0.458/varepsilon[B]/((Cp[mix](t, z)*mu[mix](t, z))^4.074*(dp/mu[mix](t, z))^4.407);
Reynolds := (t, z) -> dp*rho[mix](t, z)/mu[mix](t, z);
f := (t, z) -> 172/Reynolds(t, z) + 4.36/Reynolds(t, z)^0.12;
U := (t, z) -> 1/(1/h[water] + delta[wall]/lambda[wall] + 1/h[int](t, z));
P[CO] := (t, z) -> 1000000*Y[1](t, z);
P[H2] := (t, z) -> 1000000*Y[2](t, z);
for j to 8 do
    R[j](t, z) := A[j]*exp(-E[j]/(Rcte*T(t, z)))*P[CO](t, z)^m[j]*P[H2](t, z)^n[j];
end do;

 

#EDP's


for k to 11 do
    edp[k] := diff(C[k](t, z), t) = -v(t, z)*diff(C[k](t, z), z) + rho[B]*beta*add(nu[k][j]*R[j](t, z), j = 1 .. 8);
end do;
edp[12] := diff(T(t, z), t) = -v(t, z)*diff(T(t, z), z) + rho[B]*beta*add(add(-H[j]*nu[i][j]*R[j](t, z), i = 1 .. 10), j = 1 .. 8)/(rho[mix](t, z)*Cp[mix](t, z)) - 4*U(t, z)*(T(t, z) - Temp[water])/(dt*rho[mix](t, z)*Cp[mix](t, z));
edp[13] := diff(v(t, z), z) = -v(t, z)*diff(rho[mix](t, z), z)/rho[mix](t, z);
edp[14] := diff(rho[mix](t, z), z) = M[mix](t, z)/Rcte*(-1000000*diff(T(t, z), z)/T(t, z)^2);
edp[15] := diff(PT(t, z), z) = -f(t, z)*v(t, z)^2*rho[mix](t, z)/dp;


#Discretização do Modelo
hh := 0.11/numero;
for k to 11 do
    dis[k] := diff(C[k](t, z), z) = (x[k, i](t) - x[k, i - 1](t))/hh;
end do;
dis[12] := diff(T(t, z), z) = (x[12, i](t) - x[12, i - 1](t))/hh;
dis[13] := diff(rho[mix](t, z), z) = (x[13, i](t) - x[13, i - 1](t))/hh;
dis[14] := diff(v(t, z), z) = (x[14, i](t) - x[14, i - 1](t))/hh;
dis[15] := diff(PT(t, z), z) = (x[15, i](t) - x[15, i - 1](t))/hh;
for k from 16 to 26 do
    dis[k] := C[k - 15](t, z) = x[k - 15, i](t);
end do;
dis[27] := T(t, z) = x[12, i](t);
dis[28] := rho[mix](t, z) = x[13, i](t);
dis[29] := v(t, z) = x[14, i](t);
dis[30] := PT(t, z) = x[15, i](t);
listadis := seq(dis[k], k = 1 .. 30);
for k to 15 do
    equacao[k] := eval(edp[k], {listadis});
end do;


#Resolução 


ci[1, i] := x[1, i](0) = Conc[CO];
ci[2, i] := x[2, i](0) = Conc[H2];
for k from 3 to 11 do
    ci[k, i] := x[k, i](0) = 0;
end do;
ci[12, i] := x[12, i](0) = 503;
ci[13, i] := x[13, i](0) = 0.005165;
ci[14, i] := x[14, i](0) = 0.33*DensidadeH2 + 0.17*DensidadeCO + 0.5*DensidadeN2;
ci[15, i] := x[15, i](0) = 1000000;
cis := seq(seq(eval(ci[k, i], i = j), k = 1 .. 15), j = 1 .. numero);
unassign(i);
eqs := seq(seq(eval(equacao[k], i = j), k = 1 .. 15), j = 2 .. numero);
final[1] := x[1, 1](t) = Conc[CO];
final[2] := x[2, 1](t) = Conc[H2];
for k from 3 to 11 do
    final[k] := x[k, 1](t) = 0;
end do;
final[12] := x[12, 1](t) = 503;
final[13] := x[13, 1](t) = 0.005165;
final[14] := x[14, 1](t) = 0.33*DensidadeH2 + 0.17*DensidadeCO + 0.5*DensidadeN2;
final[15] := x[15, 1](t) = 1000000;
seqfinal := seq(final[k], k = 1 .. 15), eqs;
sol := dsolve({cis, seqfinal}, numeric, stiff = true, range = 0 .. 180);
odeplot(sol, [t, x[12, 4](t)], t = 0 .. 180);

 

Modelo_discretizado_com_t_e_tudo_constante.mw

 

Thank you already

Got a lot of worksheets who are not complete anymore once opened in maple 2020

It can be only opened with a old version of Maple
Can it be imported in Maple 2020?

example 

Dynmod03.mws

First 385 386 387 388 389 390 391 Last Page 387 of 2097