MaplePrimes Questions

Dear!

Hope everyone is fine. I want to write the values of "phi" with their line colors in legend or in title. I know how to make legends but the problem is here there are nine graphs and we need only three legends. Please fix my problem. I am waiting the positive response. Thanks in advance

Legend.mw

 

I want to solve this integer-linear programming problem. There are four variables (xp,xq,xifp,xifq)
Two variables are nonnegative and integer (xp,xq)

the other two variables are binary(xifp,xifq)
 

When executing this command, maple says that the problem appears to be unbounded

LPSolve(750*xp+250*xq-50000*xifq,maximize=true,
{20*xp+30*xq<=2600,
30*xp+20*xq<=1000,
20*xp+30*xq<=2000,
xq<=99999*xifq,
xq>=20*xifq,
xp<=99999*xifp,
xp>=30*xifp,
xp>=0,
xq>=0},
integervariables={xp,xq},
binaryvariables={xifp,xifq}
);

and gives this solution[0, [xifp = 0, xifq = 0, xp = 0, xq = 0]]

however if i set a range for the variables xp,xq from 0 to 99999 for example


LPSolve(750*xp+250*xq-50000*xifq,maximize=true,
{20*xp+30*xq<=2600,
30*xp+20*xq<=1000,
20*xp+30*xq<=2000,
xq<=99999*xifq,
xq>=20*xifq,
xp<=99999*xifp,
xp>=30*xifp,
xp>=0,
xq>=0},
integervariables={xp,xq},
binaryvariables={xifp,xifq},
xp=0..99999,
xq=0..99999
);
maple returns this solution 

[49950000, [xifp = 1, xifq = 1, xp = 50000, xq = 50000]]

but if xp=50000 and xq=50000 this doesnt satisfy the first constrain
because 20*xp+30*xq</=2600
why does maple gives this mistaken solution, how can i solve it ?
please help,thanks for reading

 

hi every body: 

i want to solve the below ODE with boundry conditions ics, can anybody help me?

The ODE:

ode := x^3*(diff(f(x), x, x, x, x))+alpha*(x^4*(diff(f(x), x, x))+x^3*(diff(f(x), x, x))-x^2*(diff(f(x), x)))-2*x^2*(diff(f(x), x, x, x))+3*x*(diff(f(x), x, x))-3*(diff(f(x), x))+R*x*f(x)^2-R*x^2*(diff(f(x), x, x))*(diff(f(x), x))-3*R*x*f(x)*(diff(f(x), x, x))+3*R*f(x)*(diff(f(x), x))+x^2*R*f(x)*(diff(f(x), x, x, x))-M^2*(x^3*(diff(f(x), x, x, x))-x^2*(diff(f(x), x))) = 0

The boundry conditions:
ics := f(0) = 0, f(1) = 1, (D(f))(1) = 0, limit(diff((diff(f(x), x))/x, x), x = 0) = 0

M,R,alpha are constants.

with regards... 

I would like procedure P to perform inside the map statement exactly as it does outside the map statement. Can this be done?

Map_Procedure.mw

 

Hi,

I have problem with my first DataTable component ( no interaction with my slider) . ( See attachement)
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw
 

Tableau de valeurs (1)

Tableau de valeurs : Contrôle sur la hauteur

 

NULL

 

Animation dynamique

Tableau de valeurs

NULL

NULL

Hauteur du cylindre inscrit : 

Volume correspondant : NULL

 

 

NULLNULL

``Choisissez la ligne pour supprimer la valeur :   

NULL

NULL

NULL

NULL

Tableau de valeurs (2)

 

Contôle sur le rayon

 

``

 

Animation dynamique

Tableau de valeurs

``

``

Rayon du cylindre inscrit : 

Volume correspondant : ``

 

 

````

NULLChoisissez la ligne pour supprimer la valeur :   

``

``

NULL

``

``

``

``

NULL

NULL

NULL


 

Download TabValeursCombin.mw

 

 

Some ideas ? 

Thanks

Say I want to use multiples commands on an expression

simplify(expand(eval(expr,x=y+1)))

 

Now similar I could use

(simplify@expand)(expr)

but how do I do it with sth like eval which needs extra arguments

(simplify@expand@eval(x->y, x=y+1))(f)

??

Hello everybody . I have a problem with plotting a trig function : arctan(x)

I would live to plot 

In the plot ,the angle jump from -pi/2(-1,57) to pi/2 (1,57)and for u-> there is an asymptot in delta=0

But instead this the asymptote that I would like to see is in delta= -3pi.

How can I remove the discontinuity of the arctan function and plot continuos negative angle?

Thank's and best regards

t := 5;
                               5
u := exp((1/2)*x-2*t*(1/3));
                            /1     10\
                         exp|- x - --|
                            \2     3 /
plot(u(x), x = -4 .. 4);


this is the exact solution graph

while below is the approximate solution graph

h := -1;
                               -1
t := 5;
                               5
u := exp((1/2)*x)*(1+t*(27*h^4+108*h^3+240*h^2+256*h)/2^7+t^2*(27*h^4+24*h^3+168*h^2)/2^7+(1/3)*t^3*(9*h^4+16*h^3)/2^6+(1/4)*t^4*h^4/2^4);
                         6877    /1  \
                         ---- exp|- x|
                         192     \2  /
plot(u(x), x = -4 .. 4);

 

with(Statistics):

Variance(Distribution(ProbabilityFunction = (k -> piecewise(k > 0, 2^(-k)))));
Error, invalid input: Statistics:-Variance expects its 1st argument, X, to be of type
{algebraic, {array, list, rtable, DataFrame, DataSeries}}, but received _m1085629680096

dd := Distribution(ProbabilityFunction = (k -> piecewise(k > 0, 2^(-k))));

Variance(dd);
                               6

The first input works in neither 2D nor 1D input mode.

Another issue is that the value of the variance is in fact wrong; Maple takes the probability function to have value 1 at zero.

I am trying to calculate the volume, lateral surface, ..., of a cone when we have two of three: radius of base, height, generator of cone.
My code only find with a element of list. How can I print all the results of the list? My code

                                                                    

restart;
 L := [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [19, 180, 181], [20, 21, 29], [20, 99, 101], [21, 220, 221], [23, 264, 265], [24, 143, 145], [28, 45, 53], [28, 195, 197], [32, 255, 257], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [57, 176, 185], [60, 91, 109], [60, 221, 229], [65, 72, 97], [68, 285, 293], [69, 260, 269], [84, 187, 205], [85, 132, 157], [88, 105, 137], [95, 168, 193], [96, 247, 265], [104, 153, 185], [105, 208, 233], [115, 252, 277], [119, 120, 169], [120, 209, 241], [133, 156, 205], [140, 171, 221], [160, 231, 281], [161, 240, 289]];
R := op(1, L[1]);
h := op(2, L[1]);
 l := op(3, L[1]);
peremeter_base := 2*Pi*R;
S_base := Pi*R^2;
V := (1/3)*Pi*R^2*h;
S_lateral := Pi*R*l;
S_total:= Pi*R*l + Pi*R^2;

 

I have spent much of my time earlier to make curve fitting possible. Somehow, because of my mistakes, the format for curve fitting changed. Can any one help me with getting my answer for curve fitting in the doc and from the excel data enclosed. Data imported, but donot know how to order the way it wants. I know the way,but do not iknow how to get it now.

Thanks

Ramakrishnan VExperimentalData.xlsxPleasePlot_Doubt.mw
 

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

58.8-19.8*v+2.75*v^2

(2)

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446745680754394150)

(3)

M1[1, 11]

"D6P10U"

(4)

M1[1, 10]

"D6P5U"

(5)

M1[2, 15]

.267

(6)

NULL

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

d[1]

["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]

(7)

d[2]

[["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]]

(8)

d[3]

["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]

(9)

NULL

``


 

Download PleasePlot_Doubt.mw

 

Dearz!

Hope everyone is fine with everything. I am facing problem to solve the system of PDEs in the attached file. Is there any built-in command to the solve the attached system of PDEs via FEM, FDM, SIMPLER algorithm or some other efficient method? Please try to fix my problem. I am waiting your positive response. Thanks in advance.

PDEs_sol.mw


Dear colleagues, Can anyone explain what (a::list,b::list) will be understood by the programme?

I thought the programme is made for only adding the numbers in the list. But it seems there is something more than that, i could not get.

Equn label (6) onwards, I donot understand, how the answer was obtained.

Thanks for explaining.

Ramakrishnan V

with(MathematicalFunctions:-Evalf); -1; addList1 := proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

(1)

s := addList1([1, 2, 3, 4], 2)

20

(2)

s := addList1([2, 2, 3, 4], 2)

22

(3)

x := 2 = 2NULL

s := addList1([x, 2, 3, 4], 2)

22

(4)

s := addList1([2, x, 3, 4], 2)

22

(5)

sumList := addList1([4, 3, 1, 3, 4, 3], 2)

26

(6)

s := addList1([4, 3, 1, 3, x, 3, 4, 3], 2)

34

(7)

s := addList1([2, 2, 3, 4], 2)

22

(8)

s := addList1([4, 3, 1, 8, x, 3, 4, 3], 2)

58

(9)

x

2

(10)

``


 

Download Doubt_on_list.mw

I have successfully created a a function of Y for the Beta-Binomial probability masss function using the built in distributions for the beta probability density function and the binomial probability mass function. However, despite trying many different things, I cannot take that function and turn it into a probability distribution for a random variable.  Of the code given below, all lines work except the last.  If someone could please help me, I would be most appreciative.

fYgivP := proc (Y) options operator, arrow; ProbabilityFunction(Binomial(n, P), Y) end proc

fP := proc (P) options operator, arrow; ProbabilityDensityFunction(('Beta')(a, b), P) end proc

fYandP := proc (Y, P) options operator, arrow; fYgivP(Y)*fP(P) end proc

fY := proc (Y) options operator, arrow; int(fYandP(Y, P), P = 0 .. 1) end proc

BB:=Distribution(ProbabilityFunction= X->piecewise(X<0,0,X>=0,  unapply(fX(X),X)))

First 888 889 890 891 892 893 894 Last Page 890 of 2427