MaplePrimes Questions

Hi

I'm trying to export a file using the .mw file. without a lot of success. Can someone help?

For 1 game, the output is between (8) and (9).

For 2 games. the output is after (17).

TEST.mw

 

How to find 
x=log(6) in maple

Hi Everyone, 

 

I am searching for some examples on Maple how to do a Static Analysis of a Truss: Method of Joints. IS there any Maplesoft App or something that has been built already that anyone here can recommend to me. Thank you in advance.  

Express cos(5t)  in terms of powers of cost and sint. cos(6t)=cos(t)^6+acos(t)^4*sin(t)^2*+bcos(t)^2*sin(t)^4+csin(t)^6.

a=?,b=?c=?

how do we find this through maple?

Hey guys, 

Is there any way to remove these imaginary parts of the numbers ?

I tried using the RealDomain package in beginning of code but it starts showing some Float(undefined) numbers and I don't understand why since none of the terms inside the sqrt are negative.

Thanks in advance.

Download Reforço.mw

Dear,

I'm trying to reproduce in Maple an integer linear programming example from Chvatal's book: 

Maximize z= 4x1 + 5x2 + 5x3 + 2x4

Subject to 33x1 + 49x2 +51x3 + 22x4 <= 120,  x= nonnegative integers. 

The optimal solution is: x1 = 2,   x= 1,  x3 = x4 = 0,     z=  13.

 

In Maple I type: 

 LPSolve( 4x1 + 5x2 + 5x3 + 2x4, {33x1 + 49x2 +51x3 + 22x4 <= 120}, maximize, assume ={nonnegative, integer}); 

but Maple gives me back the following error: 

Warning, problem appears to be unbounded. [0, [x=0, x2 =0, x3 =0, x4 =0]]

 

I know the example has the abovementioned definite solution since it comes from the textbook. So, what could I be doing wrongly? 

Many thanks for your help. 

 

As useful as the SetProperty and GetProperty commands are in this package, I am seeking a command that is called by the action of a user input prompt, for example, the prompt window question is something like:

"How many parameters of silly do you want to specifiy for this analysis? (maximum is 10)"

And once the user has entered a natural number between 1 and 10, that number of components of a specified type is generated  in the worksheet.

Is this a real thing already and I can't find it or is there a round about way to do it without an actual command existing?

Hi good afternoon , im looking for maple code of HPM to solve time dependent diffusion reaction , can anybody help me . I didnt get how to solve it by maple . 

I am fairly new to programming i Maple. I am trying to constuct a package which takes two list xlist, ylist, and using the imported Fit commands from the statictics package, tries to do line fitting. 

What am I missing to get this to work? :) 



Mat:=module()
    description "My Package";
    option package;
    Statistics(Fit);
    export LinModel; 
    LinModel :=proc(xliste::list, yliste::list,x::algebraic, $)
        return Fit(xliste,yliste,x)
        end proc; # LinModel 

    end module; #Mat

Does anybody know the inverse of x^5 + 2x^3 ???

Let A be an nxn matrix over Z, the ring of integer numbers. Let m be a positive integer number.

My question: Is there a method in Maple such that we obtain the inverse of A in modulo m.

I know that if m be a prime number then the command "Inverse(A) mod m" returns the desired result. But how about the situation when m is not a prime number.

Thanks for any Help

I'm new to Maple, and i'm learnning Maple with basic commands(the version I use is Maple2019). But after I entered some commands, the results Maple gives me is not what I expected. For example:

When i enter abs(3+5*I), I hope get a $\sqrt{34}$, but Maple gives me a complex number:

abs(3 + 5*I);
                                                         -58                                                     -59  
       1.81847767202745 10    + 7.53238114626421 10    I
sin(0);
                                                        -116                                                    -116  
      2.73949338633639 10     + 2.73949338633639 10     I
sin(pi);
                                                        -116                                                    -116  
      2.73949338633639 10     + 2.73949338633639 10     I
abs(3 + 5*I);
                                                        -58                                                      -59  
       1.81847767202745 10    + 7.53238114626421 10    I

expand(cos(4*x) + 4*cos(2*x) + 3, trig);
                                                                          -231  
                 8. - 3.75241200689042 10     I
Why???

Should I set or define something or what?

Thank you!

Hello! 

I have been using maple not so long ago and I can’t always understand for myself what is the reason for the program not working.
In this case, I need to solve a system of second-order differential equations with respect to four variables. I don’t understand what’s wrong, do not judge strictly.

// 
restart;

m1 := 50;
m2 := 70;
R1 := 0.14;
R2 := 0.17;
O1C1 := 0.3;
alpha := 0.024;
a := 0.28;
b := 0.08;
c := 0.08;
M0 := 12;
k1 := 1.7;
k2 := 0.9;
Zb := -a;
Md := M0 - k1*diff(varphi(t), t);
Mc := -k1*diff(varphi(t), t)^2;

Ixz := 0;
Iyz := m1*O1C1*(b + c) + m2*R2^2/4*alpha;
Izz := m1(R1^2/2 + O1C1^2) + m2*R2^2/4*(alpha^2 + 2);

eqMx := -M*Yc*diff(varphi(t), t $ 2) - M*Xc*diff(varphi(t), t)^2 = Xa + Xb;
eqMy := M*Xc*diff(varphi(t), t $ 2) - M*Yc*diff(varphi(t), t)^2 = Ya + Yb;
eqIy := -Ixz*diff(varphi(t), t $ 2) + Iyz*diff(varphi(t), t)^2 = Zb*Yb;
eqIx := -Iyz*diff(varphi(t), t $ 2) - Ixz*diff(varphi(t), t)^2 = Zb*Xb;
eqMz := Izz*diff(varphi(t), t $ 2) = Md + Mc;
sys := {eqIx, eqIy, eqMx, eqMy};
dsolve({sys, varphi(0) = 0}, Xa, Xb, Ya, Yb);

Error, (in dsolve) invalid arguments; expected an equation, or a set or list of them, received: { and so on }

//

I will be glad if you help me with this problem. if there are certain questions, you - ask, and I'll answer.
Here you can find the file: Курсовой_по_термеху_2.mw

I have an ordinary differential equation to be solved. when I give numeric values to B,H and L__1 (for example B=10,H=10,L__1=4), everything works fine and equations eq37a will be solved.

but when B,H and L__1 are symbolic parameters, dsolve give me this error " Error, (in dsolve) give the main variable as a second argument". and I don't know what it means.

is there any way to solve the ODE with symbolic B,H and L__1??

 

restart;

#B:=10;
#H:=10;
#L__1:=4;

eq0:=R__i=(1/2)*B+L__1;
eq01:=R__f=C+(1/2)*B+L__1;
eq02:=theta__1=arctan((H/2)/(B/2 + L__1));
eq03:=theta__2=Pi - arctan((H/2)/(B/2 - L__1));
eq43:= v__beta(r,theta,beta)= v__m(beta)*(1-(r^2/((R__max(theta,beta))^2)));
eq39:=R(beta)=R__i+2*beta*(R__f-R__i)/Pi;
eq39a:=simplify(subs([eq0,eq01], eq39));
eq38:=R__max(theta,beta)=R__max(theta,0)*(R(beta)/R__i);
eq41:=R__max(theta,0)=piecewise(theta<=rhs(eq02),(B/2+L__1)/cos(theta),theta<=rhs(eq03),(H/2)/sin(theta),rhs(eq03)<theta,(B/2-L__1)/cos(Pi-theta));
eq38a:= simplify(subs([eq41,eq39a,eq0], eq38));
eq44 := v__m(beta) = 1/(2*int((1 - r^2/R__max(theta, beta)^2)*r, [r = 0 .. R__max(theta, beta), theta = 0 .. Pi]));
eq44a:=simplify(subs(eq38a,eq44)) assuming B/L__1 >= 2 , H > 0 , B > 0 , L__1 > 0;
eq44b:= v__m(beta)= rhs(eq44a) * B * H;
eq47:=subs([eq44b,eq38a],eq43);

eq0 := R__i = (1/2)*B+L__1

 

eq01 := R__f = C+(1/2)*B+L__1

 

eq02 := `&theta;__1` = arctan(H/(2*((1/2)*B+L__1)))

 

eq03 := `&theta;__2` = Pi-arctan(H/(2*((1/2)*B-L__1)))

 

eq43 := `v__&beta;`(r, theta, beta) = v__m(beta)*(1-r^2/R__max(theta, beta)^2)

 

eq39 := R(beta) = R__i+2*beta*(R__f-R__i)/Pi

 

eq39a := R(beta) = (1/2)*B+L__1+2*beta*C/Pi

 

eq38 := R__max(theta, beta) = R__max(theta, 0)*R(beta)/R__i

 

eq41 := R__max(theta, 0) = piecewise(theta <= arctan(H/(2*((1/2)*B+L__1))), ((1/2)*B+L__1)/cos(theta), theta <= Pi-arctan(H/(2*((1/2)*B-L__1))), H/(2*sin(theta)), Pi-arctan(H/(2*((1/2)*B-L__1))) < theta, -((1/2)*B-L__1)/cos(theta))

 

eq38a := R__max(theta, beta) = (Pi*(B+2*L__1)+4*beta*C)*piecewise(theta <= arctan(H/(B+2*L__1)), (B+2*L__1)/cos(theta), theta <= Pi-arctan(H/(B-2*L__1)), H/sin(theta), Pi-arctan(H/(B-2*L__1)) < theta, (-B+2*L__1)/cos(theta))/(2*Pi*(B+2*L__1))

 

eq44 := v__m(beta) = 2/(int(R__max(theta, beta)^2, theta = 0 .. Pi))

 

eq44a := v__m(beta) = 2*Pi^2*(B+2*L__1)^2/(H*(B*Pi+4*C*beta+2*L__1*Pi)^2*B)

 

eq44b := v__m(beta) = 2*Pi^2*(B+2*L__1)^2/(B*Pi+4*C*beta+2*L__1*Pi)^2

 

v__beta(r, theta, beta) = 2*Pi^2*(B+2*L__1)^2*(1-4*r^2*Pi^2*(B+2*L__1)^2/((Pi*(B+2*L__1)+4*beta*C)^2*piecewise(theta <= arctan(H/(B+2*L__1)), (B+2*L__1)/cos(theta), theta <= Pi-arctan(H/(B-2*L__1)), H/sin(theta), Pi-arctan(H/(B-2*L__1)) < theta, (-B+2*L__1)/cos(theta))^2))/(B*Pi+4*C*beta+2*L__1*Pi)^2

(1)

eq37:=diff(v__r(r, theta, beta),r)*r*(R__f-r*cos(theta))+v__r(r,theta,beta)*(R__f-2*r*cos(theta))+r*diff(v__beta(r,theta,beta),beta)=0;
eq37a:=simplify(expand(subs(eq47, eq37)));

eq37 := (diff(v__r(r, theta, beta), r))*r*(R__f-r*cos(theta))+v__r(r, theta, beta)*(R__f-2*r*cos(theta))+r*(diff(`v__&beta;`(r, theta, beta), beta)) = 0

 

(-2*(Pi*(B+2*L__1)+4*beta*C)^2*((1/2)*(Pi*(B+2*L__1)+4*beta*C)^3*(r*cos(theta)-R__f)*r*(diff(v__r(r, theta, beta), r))+(Pi*(B+2*L__1)+4*beta*C)^3*(r*cos(theta)-(1/2)*R__f)*v__r(r, theta, beta)+8*C*r*Pi^2*(B+2*L__1)^2)*piecewise(theta <= arctan(H/(B+2*L__1)), (B+2*L__1)/cos(theta), theta <= Pi-arctan(H/(B-2*L__1)), H/sin(theta), Pi-arctan(H/(B-2*L__1)) < theta, (-B+2*L__1)/cos(theta))^2+128*C*r^3*Pi^4*(B+2*L__1)^4)/((Pi*(B+2*L__1)+4*beta*C)^5*piecewise(theta <= arctan(H/(B+2*L__1)), (B+2*L__1)/cos(theta), theta <= Pi-arctan(H/(B-2*L__1)), H/sin(theta), Pi-arctan(H/(B-2*L__1)) < theta, (-B+2*L__1)/cos(theta))^2) = 0

(2)

bc:=v__r(rhs(eq38a),theta,beta)=0;

bc := v__r((Pi*(B+2*L__1)+4*beta*C)*piecewise(theta <= arctan(H/(B+2*L__1)), (B+2*L__1)/cos(theta), theta <= Pi-arctan(H/(B-2*L__1)), H/sin(theta), Pi-arctan(H/(B-2*L__1)) < theta, (-B+2*L__1)/cos(theta))/(2*Pi*(B+2*L__1)), theta, beta) = 0

(3)

sol3:=simplify(dsolve([eq37a,bc], v__r(r, theta,beta)));

Error, (in dsolve) give the main variable as a second argument

 

NULL


 

Download Mechrect.mw

First 622 623 624 625 626 627 628 Last Page 624 of 2424