Kitonum

21540 Reputation

26 Badges

17 years, 107 days

MaplePrimes Activity


These are answers submitted by Kitonum


 

restart;
alpha:=Pi/6: V[A]:=1: l:=3: f:=0.2: d:=2.5:
# The movement of the body along the segment AB
de:=m*diff(x1(t),t,t)=G*sin(alpha)-F[fr]:
G:=m*g: F[fr]:=m*g*f*cos(alpha): g:=9.81:
ics:=x1(0)=0, D(x1)(0)=V[A]:
de:=evalf(de/m);
B:=rhs(de);
sol:=dsolve({de,ics}, x1(t)); # The solution of de
x1:=unapply(evalf(rhs(sol)),t);
fsolve(x1(t)=l);
tau:=%[2];
V['B']:=D(x1)(tau);
tau:=evalf[3](tau);
 

diff(diff(x1(t), t), t) = 3.205858157

 

3.205858157

 

x1(t) = (3205858157/2000000000)*t^2+t

 

proc (t) options operator, arrow; 1.602929078*t^2+t end proc

 

-1.715094465, 1.091236545

 

1.091236545

 

4.498349578

 

1.09

(1)

# The movement of the body along the curve BC
sys:=m*diff(x(t),t,t)=0, m*diff(y(t),t,t)=m*g;
ics_sys:=x(0)=0, y(0)=0, D(x)(0)=V['B']*cos(alpha), D(y)(0)=V['B']*sin(alpha):
Sol:=evalf(dsolve({sys, ics_sys},{x(t),y(t)})); # The solution of sys
x:=unapply(eval(x(t),Sol),t); y:=unapply(eval(y(t),Sol),t);
T:=evalf(solve(x(t)=d));
h:=evalf(y(T));
T:=evalf[2](T);
h:=evalf[3](h);   
 

m*(diff(diff(x(t), t), t)) = 0, m*(diff(diff(y(t), t), t)) = 9.81*m

 

{x(t) = 3.895685011*t, y(t) = 4.905000000*t^2+2.249174789*t}

 

proc (t) options operator, arrow; 3.895685011*t end proc

 

proc (t) options operator, arrow; 4.905000000*t^2+2.249174789*t end proc

 

.6417356621

 

3.463375629

 

.64

 

3.46

(2)


Visualization

with(plots): with(plottools):
bg:=display(curve([[-2.6,-1],[-2.6,-4],[0,-4],[0,-0.1],[3,3*tan(Pi/6)-0.1]], color=black, thickness=2)):
P:=s->piecewise(s>=0 and s<=tau,[(3-x1(s))*cos(Pi/6),(3-x1(s))*sin(Pi/6)],[-x(s-tau),-y(s-tau)]):
Trajectory:=t->display(plot([P(s)[1],P(s)[2],s=0..t],linestyle=3,color=red), pointplot(`if`(t>=0 and t<=tau,[(3-x1(t))*cos(Pi/6),(3-x1(t))*sin(Pi/6)], [-x(t-tau),-y(t-tau)]),symbol=solidcircle, symbolsize=20, color=red)):
animate(Trajectory,[t], t=0..tau+T, background=bg, scaling=constrained, size=[500,500], axes=none);

 

 


Edit.

Download sol_Maple_new1.mw

All calculations are made with 10 significant digits (by default). In the final answers, the number of digits is left as in your document:


 

restart;
alpha:=Pi/6: V[A]:=1: l:=3: f:=0.2: d:=2.5:
# The movement of the body along the segment AB
de:=m*diff(x1(t),t,t)=G*sin(alpha)-F[fr]:
G:=m*g: F[fr]:=m*g*f*cos(alpha): g:=9.81:
ics:=x1(0)=0, D(x1)(0)=V[A]:
de:=evalf(de/m);
B:=rhs(de);
sol:=dsolve({de,ics}, x1(t)); # The solution of de
fsolve(rhs(sol)=l);
tau:=evalf[3](%[2]);
V['B']:=B*tau+V[A];
 

diff(diff(x1(t), t), t) = 3.205858157

 

3.205858157

 

x1(t) = (3205858157/2000000000)*t^2+t

 

-1.715094465, 1.091236545

 

1.09

 

4.494385391

(1)

# The movement of the body along the curve BC
sys:=m*diff(x(t),t,t)=0, m*diff(y(t),t,t)=m*g;
ics_sys:=x(0)=0, y(0)=0, D(x)(0)=V['B']*cos(alpha), D(y)(0)=V['B']*sin(alpha):
Sol:=evalf(dsolve({sys, ics_sys})); # The solution of sys
T:=evalf(solve(eval(x(t),Sol)=d));
h:=evalf(eval(eval(y(t),Sol),t=T));
T:=evalf[2](T);
h:=evalf[3](h);   
 

m*(diff(diff(x(t), t), t)) = 0, m*(diff(diff(y(t), t), t)) = 9.81*m

 

{x(t) = 3.892251925*t, y(t) = 4.905000000*t^2+2.247192696*t}

 

.6423016927

 

3.466940605

 

.64

 

3.47

(2)

 


 

Download sol_Maple.mw

use 2-argument  arctan :

arctan(cos(beta),sin(beta)) assuming beta>0, beta<Pi/2;

                                    


See help on the  arctan  function. The two-argument  actan(y,x)  is a very useful function because it for a point  (x,y)  returns its polar angle in the range  -Pi<phi<=Pi  , for example  arctan(-1, -sqrt(3)) = -5*Pi/6

Your assignments do not work, probably due to the fact that you are using the deprecated command  linalg[matrix] . See

D__CoR := linalg[matrix](4, 4, [1, 0, 0, x(t), 0, 1, 0, 0, 0, 0, 1, z(t), 0, 0, 0, 1]);
whattype(D__CoR);
D__CoR := Matrix(4, 4, [1, 0, 0, x(t), 0, 1, 0, 0, 0, 0, 1, z(t), 0, 0, 0, 1]);
whattype(D__CoR);

                        

 

 


For work, it is convenient to set  lambda  as a function of  x :

restart

lambda := proc (x) options operator, arrow; (-1.565845910+2.393779704*x^2+1.564996800*x^4+1.800900000*x^6)/(x^2+2)^4 end proc

proc (x) options operator, arrow; (-1.565845910+2.393779704*x^2+1.564996800*x^4+1.800900000*x^6)/(x^2+2)^4 end proc

(1)

data := [seq([x, lambda(x)], x = 0 .. 1, .1)]

[[0, -0.9786536938e-1], [.1, -0.9445602702e-1], [.2, -0.8473253124e-1], [.3, -0.7004169612e-1], [.4, -0.5215959052e-1], [.5, -0.3283205351e-1], [.6, -0.1345044703e-1], [.7, 0.5065808511e-2], [.8, 0.2221891338e-1], [.9, 0.3780341321e-1], [1.0, 0.5177568635e-1]]

(2)

P:=CurveFitting:-PolynomialInterpolation(data, x);

-0.6488921957e-3*x^10-.1643827022*x^9+.8708102427*x^8-1.816961080*x^7+1.747871420*x^6-.4949702068*x^5-.3193961523*x^4-0.1962083349e-1*x^3+.3469960911*x^2-0.5683119e-4*x-0.9786536938e-1

(3)

plot([lambda(x),P], x=-0.5..1.5, color=[blue,red]);

 

 


We see that on the segment  [0,1] the graphs practically coincide, but outside the segment the approximation is much worse.

Download help_new.mw

We can easily get the result as  piecewise  function:


 

restart;
int(cos(j*t)*cos(k*t), t = -Pi..Pi, allsolutions) assuming posint:
convert(%, piecewise, j);

piecewise(j = k, Pi, 0)

(1)

 


 

Download int.mw

If you want an undisclosed sum, then use  Sum  instead of  sum :

E:=(2*h^2*Sum(x[i]^2,i=1..4))*alpha+(2*h^2*Sum(x[i]^2*y[i],i=1..4))*beta+2*h*Sum(x[i]^2,i=1..4)-2*h*Sum(x[i]*x[i+1],i=1..4);
map(t->2*t,collect(E/2, h));

    

 

The visualization shows that Maple returns the correct result, which can be simplified (see the last line of the code):


 

NULL

restart;
f := 1-4*(x-1)*(1+y)/(x^2*(1-y)):
solve(f>0, useassumptions) assuming  1<=x, x<=4, 0<y,y<1;
y:=x->solve(f, y);
A:=plot3d(f, x=1..4, y=0..1):
B:=plots:-spacecurve([x,y(x),0], x=1..4, color=red, thickness=3):
C:=plot3d(0, x=1..4, y=0..1, color=yellow, transparency=0.5):
plots:-display(A, B, C, view=[0..4,0..1,-5..5], axes=normal);
plots:-inequal([{0 < y, 1 <= x, x < 2, y < (x^2-4*x+4)/(x^2+4*x-4)}, {0 < y, 2 < x, x <= 4, y < (x^2-4*x+4)/(x^2+4*x-4)}], x=1..4, y=0..1, color=green, nolines); # Visualization of the answer
{y>0, 1 <= x, x < 2, y < (x^2-4*x+4)/(x^2+4*x-4)},{0 < y, 2 < x, x <= 4, y < (x^2-4*x+4)/(x^2+4*x-4)};  # This is the answer (the domain is the union of 2 flat regions)

{x = 1, 0 < y, y < 1}, {0 < y, 1 < x, x < 2, y < (x^2-4*x+4)/(x^2+4*x-4)}, {0 < y, 2 < x, x < 4, y < (x^2-4*x+4)/(x^2+4*x-4)}, {x = 4, 0 < y, y < 1/7}

 

proc (x) options operator, arrow; solve(f, y) end proc

 

 

 

{1 <= x, 0 < y, x < 2, y < (x^2-4*x+4)/(x^2+4*x-4)}, {x <= 4, 0 < y, 2 < x, y < (x^2-4*x+4)/(x^2+4*x-4)}

(1)

``


 

Download positive_function_new2.mw

This can be done in many ways. Here are 2 ways:


 

Example: Using a Formula

 

Height of a Cylinder:

ex6v := 600

ex6r := 4

ex6h := ex6v/(Pi*ex6r^2); plot3d([0, ex6h], x = -4 .. 4, y = -sqrt(4^2-x^2) .. sqrt(4^2-x^2), style = surface, filled); plots:-display(plottools:-cylinder([0, 0, 0], ex6r, ex6h, style = surface, strips = 100))

(75/2)/Pi

 

 

 

NULL


 

Download heightofcylinder-new.mw

Your matrix equation  S*A*inverse(S)=A  is equivalent to  S*A-A*S=0  provided that  det(S)<>0 .
The solution is below:


 

restart;
A:=Matrix([[1,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]):
S:=Matrix([[a,b,c,d],[e,f,g,h],[i,j,k,l],[m,n,o,p]]):
S.A-A.S;

Matrix(4, 4, {(1, 1) = 0, (1, 2) = -b, (1, 3) = -c, (1, 4) = -d, (2, 1) = e, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (3, 1) = i, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (4, 1) = m, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0})

(1)

S:=<a,0,0,0; 0,f,g,h; 0,j,k,l; 0,n,o,p>;
LinearAlgebra:-Determinant(S);

Matrix(4, 4, {(1, 1) = a, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = f, (2, 3) = g, (2, 4) = h, (3, 1) = 0, (3, 2) = j, (3, 3) = k, (3, 4) = l, (4, 1) = 0, (4, 2) = n, (4, 3) = o, (4, 4) = p})

 

a*(f*k*p-f*l*o-g*j*p+g*l*n+h*j*o-h*k*n)

(2)

# Answer: S is any matrix above under the condition
%<>0;

a*(f*k*p-f*l*o-g*j*p+g*l*n+h*j*o-h*k*n) <> 0

(3)

S.A.S^(-1);  # Check

Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0})

(4)

 


 

Download ME.mw

Let  k=theta/V  so  theta=k*V .

isolate(subs(theta = k*V, (1/3)*m*a^2*theta*s^2+(1/16)*m*g*a*sqrt(2)*(4+4*theta-Pi)+theta*B*s = (-K__m^2*s*theta+K__m*V)/(L*s+R)), k);
 ;

                 

In real domain use the  surd  function for this:

 

Example: Verifying Inverse Functions Graphically

 

NULL

"ex17f5(x):=2 x^(3)-1:"

"ex17g5(x):=surd((x+1)/(2),3):  plot([ex17f5(x),ex17g5(x)], x=-4..6, y=-4..6, scaling=constrained);"

 

NULL


The reason that the blue curve is not completely plotted in your document  is that Maple, for a negative number of the three possible values of the cubic root, returns the principal value of the cubic root (with the smallest argument). Compare:
 

simplify((-8)^(1/3)); 
surd(-8, 3)


Download inverseExample_new.mw

In fact, all your functions depend only on the variable  t . I made all the necessary simplifications and changes. In particular, I replaced  combine  with  simplify  with the option  size , because it turns out a more compact expression:

 

restartNULL

V__2six := proc (t) options operator, arrow; diff(x(t), t)-(l__1*sin(`&theta;__si`(t))-l__2c*sin(`&beta;__si`(t)+`&theta;__si`(t)))*cos(psi(t))*(diff(psi(t), t))-sin(psi(t))*(l__1*cos(`&theta;__si`(t))*(diff(`&theta;__si`(t), t))-`l__2&scy;`*cos(`&beta;__si`(t)+`&theta;__si`(t))*(diff(`&theta;__si`(t), t)+diff(`&beta;__si`(t), t))) end proc

proc (t) options operator, arrow; diff(x(t), t)-(l__1*sin(theta__si(t))-l__2c*sin(beta__si(t)+theta__si(t)))*cos(psi(t))*(diff(psi(t), t))-sin(psi(t))*(l__1*cos(theta__si(t))*(diff(theta__si(t), t))-`l__2с`*cos(beta__si(t)+theta__si(t))*(diff(theta__si(t), t)+diff(beta__si(t), t))) end proc

(1)

V__2siy := proc (t) options operator, arrow; -l__1*sin(`&theta;__si`(t))*(diff(`&theta;__si`(t), t))-`l__2&scy;`*sin(`&beta;__si`(t)+`&theta;__si`(t))*(diff(`&theta;__si`(t), t)+diff(`&beta;__si`(t), t)) end proc

proc (t) options operator, arrow; -l__1*sin(theta__si(t))*(diff(theta__si(t), t))-`l__2с`*sin(beta__si(t)+theta__si(t))*(diff(theta__si(t), t)+diff(beta__si(t), t)) end proc

(2)

V__2siz := proc (t) options operator, arrow; diff(z(t), t)+(l__1*sin(`&theta;__si`(t))+l__2c*sin(`&beta;__si`(t)+`&theta;__si`(t)))*sin(psi(t))*(diff(psi(t), t))-cos(psi(t))*(l__1*cos(`&theta;__si`(t))*(diff(`&theta;__si`(t), t))+`l__2&scy;`*cos(`&beta;__si`(t)+`&theta;__si`(t))*(diff(`&theta;__si`(t), t)+diff(`&beta;__si`(t), t))) end proc

proc (t) options operator, arrow; diff(z(t), t)+(l__1*sin(theta__si(t))+l__2c*sin(beta__si(t)+theta__si(t)))*sin(psi(t))*(diff(psi(t), t))-cos(psi(t))*(l__1*cos(theta__si(t))*(diff(theta__si(t), t))+`l__2с`*cos(beta__si(t)+theta__si(t))*(diff(theta__si(t), t)+diff(beta__si(t), t))) end proc

(3)

V__2si := proc (t) options operator, arrow; simplify((V__2six^2+V__2siy^2+V__2siz^2)(t), size) end proc

proc (t) options operator, arrow; simplify((V__2six^2+V__2siy^2+V__2siz^2)(t), size) end proc

(4)

V__2si(t)

(-`l__2с`*sin(psi(t))*(diff(theta__si(t), t)+diff(beta__si(t), t))*cos(beta__si(t)+theta__si(t))+l__1*cos(psi(t))*(diff(psi(t), t))*sin(theta__si(t))+l__1*sin(psi(t))*cos(theta__si(t))*(diff(theta__si(t), t))-l__2c*cos(psi(t))*(diff(psi(t), t))*sin(beta__si(t)+theta__si(t))-(diff(x(t), t)))^2+(`l__2с`*sin(beta__si(t)+theta__si(t))*(diff(theta__si(t), t)+diff(beta__si(t), t))+l__1*sin(theta__si(t))*(diff(theta__si(t), t)))^2+(`l__2с`*cos(psi(t))*(diff(theta__si(t), t)+diff(beta__si(t), t))*cos(beta__si(t)+theta__si(t))+l__1*cos(psi(t))*cos(theta__si(t))*(diff(theta__si(t), t))-l__1*sin(psi(t))*(diff(psi(t), t))*sin(theta__si(t))-l__2c*sin(psi(t))*(diff(psi(t), t))*sin(beta__si(t)+theta__si(t))-(diff(z(t), t)))^2

(5)

``

``


 

Download equations_new.mw

You must specify a sequence step, for example:

f := unapply(3*x^2-2*x^3-1.080674649*x^2*(x-1)^2-.8118769171*x^2*(x-1)^3+.4147046974*x^2*(x-1)^4+.4585681954*x^2*(x-1)^5, x):
ma := seq(f(x), x = 0..1, 0.1);

             ma := 0., 0.02517819625, 0.09374594496, 0.1954298021, 0.3207056009, 0.4607261850, 0.6065902371, 0.7481833253, 0.8728222816, 0.9639340323, 1.000

restart;	
f:=(x,y)->sin(x)*cos(y):
g:=(x,y)->sin(y)*cos(x):
v:=(x,y)->combine(f(x,y)-g(x,y)):
v(x,y);

                                

First 58 59 60 61 62 63 64 Last Page 60 of 290