Kitonum

21530 Reputation

26 Badges

17 years, 86 days

MaplePrimes Activity


These are answers submitted by Kitonum

To find stationary points use  fsolve  as in the simple example:

deriv:=x->fdiff(2*t-t^2, t=x);

fsolve('deriv'(x)=0);

                                  1.000000000

 

or the most simple

fsolve(deriv);

                                  1.000000000

Just write:

restart;

vec:=<a, b, c>:

a:=1:

vec;

                       

 

 Addition: If you don't know the symbol for  vec[1]  then you can write:

restart;

vec:=<a,b,c>:

assign(vec[1], 1);

vec;

a;

                        

 

 

 

Error reason is that you miss the multiplication sign between  b  and subsequent expression in parentheses. In this case, Maple treats  b  as the function name, and the expression in parentheses as the argument of this function. Here is another example where this situation is evident:

eval(sin(x), sin=1);

                                            1

If you put a multiplication sign, the result is true:

c:=1/(b*(1+x/l));

eval(c, [b=1,l=1]);

                               

 

 

Another method with similar idea but slightly shorter:

eq := (-Omega^2*a*A[2]-Omega^2*m*B[1]+Omega*A[1]*c[1]+B[1]*k[1])*cos(Omega*t)+(Omega^2*a*B[2]-Omega^2*m*A[1]-Omega*B[1]*c[1]+A[1]*k[1])*sin(Omega*t) = 0:

eq1:=subs({sin(Omega*t)=s, cos(Omega*t)=c}, lhs(eq));

coeff(eq1, s);

coeff(eq1, c);

                

 

 

 

plots[inequal]  command allows you to get a high-quality picture:

plots[inequal]({y>=0, x^0.5+y^0.5<=2}, x=0..1, y=0..4, optionsfeasible=[color=yellow], optionsclosed=[color=blue, thickness=4], optionsexcluded=[color="WhiteSmoke"]);

                           

 

 Edit. The above variant works in Maple 2015. For older versions Maple use  filledregions=true  option. The result is the same:

A:=plot([solve(x^0.5+y^0.5-2, y), 0], x=0..1, color=blue, thickness=4):

B:=plots[implicitplot](x^0.5+y^0.5-2, x=0..1, y=0..4, coloring=[yellow, "WhiteSmoke"], filledregions=true, gridrefine=3):

plots[display](A, B);

 

tickmarks  option solves your problem.

Example:

A:= LinearAlgebra[RandomMatrix](8, generator=5..15):

plots[matrixplot](A, axes=normal, tickmarks=[[seq(i=eq||i,i=1..8)], [seq(i=q||i,i=1..8)], default], view=[0..9, 0..9, 0..17], axesfont=[TIMES,ROMAN,10], orientation=[25,75]);

                             

 

 

 

 

 

The symbol  r  is your fraction.

 

Coefficients_of_Fractions1.mw

applyrule([

cos(u::anything)*cos(v::anything)-sin(u::anything)*sin(v::anything)=cos(u+v),

cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v),

sin(u::anything)*sin(v::anything)-cos(u::anything)*cos(v::anything)=-cos(u+v),

-sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(-(sin(psi[1](t))*cos(theta[1](t))*cos(gamma[1](t))+sin(psi[1](t))*sin(theta[1](t))*sin(gamma[1](t))-cos(theta[1](t))*cos(psi[1](t))*sin(gamma[1](t))+cos(psi[1](t))*sin(theta[1](t))*cos(gamma[1](t)))*cos(beta[1](t)), size)):

 

(trigsubs(2*combine(%))[])/2;

                         cos(beta[1](t))*sin(-theta[1](t)-psi[1](t)+gamma[1](t))

There are infinitely many solutions. They all lie on the circle with center  -I  and radius 1. The equation of the circle in the complex plane will:

x:=a+I*b:

evalc(abs(I+x) = 1);

                          (a^2+(b+1)^2)^(1/2) = 1

The real solution is only one  x=0


Addition: This result is clear without any calculations because the equation can be rewritten as  abs(x-(-I))=1  and we know that  abs(z1-z2)  is the distance  between  z1  and  z2  in the complex plane.

Perhaps you work in a classic interface, in which the filling for non-convex polygons is not working properly. In the standard worksheet everything correctly:

L := [[[0, 0, 0], [0, 1, 0]], [[x, x^2+1, 0], x = 0 .. 2], [[2, 5, 0], [2, 2, 0]], [[x, x, 0], x = 2 .. 0]]:

plots[display](Picture(L, color = yellow), axes = normal, scaling = constrained);

                          

 

 

 

Use  solve  instead of  fsolve:

restart;

solve({6.268 = a*c+0.710, 10.049 = a*(c+2.5*10^(-5)*(0.004/(0.025)))+0.710}, {a, c});

                                       {a = 945250., c =0 .5879925946e-5}

 

 

 

We can easily find maximum symbolically, if to convert the sum into the product and use that the maximum and minimum of  cos(a*t+b) , a<>0,  are the same as  cos(t) :

restart;

f:= cos(2*t/m) + cos(2*(t+5)/m):

simplify(applyrule(cos(alpha::anything)+cos(beta::anything)=2*cos((alpha+beta)/2)*cos((alpha-beta)/2), f));

max(eval(%, op(2,%)=-1), eval(%, op(2,%)=1));

                                                  

 

 

 

restart;

eq1:=-sin(alpha0(t))*cos(beta0(t)) = -sin(alpha[1](t))*cos(beta[1](t));

eq2:=cos(alpha0(t))*cos(beta0(t)) = cos(alpha[1](t))*cos(beta[1](t));

simplify(eq1/eq2, trig);

convert(%, tan)*(-1);

                      

 

 

This variant works immediately:

restart;

question1 := b(t)*(diff(c(t), t))*(diff(a(t), t))+a(t)*(diff(b(t), t)):

eval(question1, b(t)=0);

                                                0

See help on  Student[MultivariateCalculus][Jacobian]  command.

In your example, I have changed the variables so that they to be the names because

type(beta(t), name);

whattype(beta(t));

                                                 false

                                               function

 

Solution: 

eq1:=l1*cos(theta)+l2*sin(beta)-x=0:

eq2:=l1*sin(theta)-l2*cos(beta)=0:

Student[MultivariateCalculus][Jacobian](lhs~([eq1,eq2]), [beta,x,theta]);

                        

 

First 194 195 196 197 198 199 200 Last Page 196 of 290