Kitonum

21470 Reputation

26 Badges

17 years, 48 days

MaplePrimes Activity


These are answers submitted by Kitonum

Sx:=1/sqrt(2)*Matrix([[0,1,0],[1,0,1],[0,1,0]]);
lam,v:=LinearAlgebra:-Eigenvectors(Sx);
map(r->Vector(r/~LinearAlgebra:-VectorNorm(Vector(r),2)),convert(v^%T,listlist)); 

                  

 

 

The problem is easy to solve if you just cut out regions with asymptotes from the plot:

restart;
func:=unapply(-tan((-4*t+x+2*y)/(2*sqrt(15)))/(2*sqrt(2)), x,y,t):
y1:=solve((-4*t+x+2*y)/(2*sqrt(15))=-Pi/2,y);
y2:=solve((-4*t+x+2*y)/(2*sqrt(15))=Pi/2,y);
y3:=solve((-4*t+x+2*y)/(2*sqrt(15))=3*Pi/2,y);
y4:=solve((-4*t+x+2*y)/(2*sqrt(15))=5*Pi/2,y);
A:=plot3d(func(x,y,4), x=-10..10, y=eval(y1+0.1..y2-0.1,t=4), style=surface):
B:=plot3d(func(x,y,4), x=-10..10, y=eval(y2+0.1..y3-0.1,t=4), style=surface):
C:=plot3d(func(x,y,4), x=-10..10, y=eval(y3+0.1..y4-0.1,t=4), style=surface):
plots:-display(A,B,C, scaling=constrained);

    

restart;
eq := cos(2*x)-sin(x)*(sin(x)^2+1)^(1/2)+cos(x)^2*sin(x)/(sin(x)^2+1)^(1/2):
solve(subs(x=arcsin(y), eq));

                                     

By default, Maple works in the complex domain and, of 3 values for a cube root, returns the value with the smallest argument (the principal value of a root). When working in the real domain, use the  surd  command:

a:=(-8)^(1/3);
evalc(a);
surd(-8,3);
plot(surd(x,3), x=-8..8, size=[1000,250], scaling=constrained, labels=[x,surd(x,3)]);

An alternative for  surd  would be to call the package  RealDomain :

with(RealDomain):
plot(x^(1/3), x=-8..8, size=[1000,250], scaling=constrained, labels=[x, x^(1/3)]);

 

It is best not to use the command to draw a surface of revolution. Below, to construct the intersection, the cone and the plane are given by explicit equations in 3D, and both spheres are given by graphic primitives:

restart;
# f := x -> 0.5*x;
# small sphere
# g := x -> sqrt(0.8944271908^2 - (x - 2)^2)
# bigger sphere 
# h := x -> sqrt(3.354101965^2 - (x - 7.5)^2)

with(plots): with(plottools):
Eq:=y=1.216350358*x - 3.841106394:
Plane:=implicitplot3d(Eq, x=0..12, y=-5..5, z=-5..5, style=surface, color=green):
Cone:=plot3d([2*r,r*cos(phi),r*sin(phi)], phi=0..2*Pi, r=0..5, style=surface, transparency=0.5):
small_sphere:=sphere([2,0,0],0.8944271908, style=surface, color=gold):
bigger_sphere:=sphere([7.5,0,0],3.354101965, style=surface, color=gold):
Ellipse:=intersectplot(surface([2*r,r*cos(phi),r*sin(phi)], phi=0..2*Pi, r=0..5),surface(Eq, x=0..12, y=-5..5, z=-5..5), thickness=2): 
display(Cone,Plane,small_sphere,bigger_sphere,Ellipse, axes=normal, scaling=constrained);

                  


Edit. You can make the cutting plane partially transparent using the option  style=line  instead of  style=surface  or the transparency  option.

Right-click on this picture, select  Export  from the pop-up menu and save the picture in the desired format.

The following code is working:

restart; 
A := Matrix([[10, 2, 0, 0, 0], [1, 4, 2, 0, 0], [0, 1, 6, 2, 0], [0, 0, 2, 7, 3], [0, 0, 0, 2, 18]], datatype = float, storage = sparse);
b := Vector([11, 20, 34, 56, 77], datatype = float);
X := LinearAlgebra:-LinearSolve(A, b, method = SparseIterative);


Edit. The help says that the matrix can be nonsymmetric.

We see that this equation has 1 real and 2 complex roots:

[solve(5*x^3-x^2+x-1=0, explicit)];
evalf~(%);

Example:

restart;
P:=randpoly([x,y]);
C:=[coeffs(P,[x,y], 't')];
T:=[t];
TC:=zip(`[]`,T,C);
L:=[seq([[degree(p[1],x),degree(p[1],y)],p[2]], p=TC)];

 

I think this integral can only be calculated numerically when all parameters are given. 

Example:

restart;
Cap_Unit_Length := Int((epsilon_0*epsilon_r*d*sqrt(1+(T*Pi*S)^2))/(epsilon_r*S*theta*tan(theta/2)+2*t),theta=0..Pi);
evalf(eval(Cap_Unit_Length, [epsilon_0=1,epsilon_r=2,d=3,T=4,S=5,t=6]));

                                        

You can easily do this by removing the term  O(x^6)  and adding the required term (here  xi  is between  0  and  x ):

restart;
convert(series(cos(x),x=0, 5), polynom)+(D@@6)(cos)(xi)*x^6/6!;

                                  


See the general formula in  https://en.wikipedia.org/wiki/Taylor%27s_theorem


Edit.

I think that different forms of answers are related to different methods used in the calculation. Use method=FTOC option for simplicity in this example:

int(2*Pi*x*sqrt(1+x^(-4/3)/9), x=0..1, method=FTOC);

                                 


FTOC (abbreviation) = fundamental theorem of calculus

 

Since the interval for the unknown  h  (in which we are looking for a solution) has already been indicated  h>=10 and h<=20, everything can be done in 1 step:

restart;
f := x -> sqrt(-x^2+20*x):
solve(2*Pi*int(f(x)*sqrt(1+diff(f(x),x)^2),x=0..h)=1005) assuming h>=10,h<=20;

                                         201/(4*Pi)

 

We can easily find all matrices that commute with A by simply reducing the problem to solving a system of 4 equations with 4 unknowns:

restart;
A := Matrix(2, 2, [[3, 1], [-3, 2]]):
C := Matrix(2, 2, [[x, y], [u, v]]);
A.C=~C.A;
Sys:=convert(%,set);
solve(Sys);
C:=eval(C, %); # The general formula for C,where  x and y are any numbers
E:=eval(C, [x=1,y=2]); # The specific example
E.A=A.E;  # Check

    

The new procedure  NewLegend1  allows you to place the opaque rectangle anywhere on the plot. Please note that in the list  G , you must specify a spacing for the variable  y  also as for  x .

restart;
NewLegend1:=proc(f::algebraic,g::algebraic,R::list,G::list)
local A1, A2, A3, A4, B, a, b, l1, l2, T;
uses plottools, plots;
A1:=implicitplot([y=f,y=g], subsop(1=(x=op([2,1],G[1])..R[1,1]),2=(y=op([2,1],G[2])..R[1,2]),G)[], labels=["x","y"]);
A2:=implicitplot([y=f,y=g], subsop(1=(x=R[1,1]..op([2,2],G[1])),2=(y=op([2,1],G[2])..R[2,2]),G)[], labels=["x","y"]);
A3:=implicitplot([y=f,y=g], subsop(1=(x=R[2,1]..op([2,2],G[1])),2=(y=R[2,2]..op([2,2],G[2])),G)[], labels=["x","y"]);
A4:=implicitplot([y=f,y=g], subsop(1=(x=op([2,1],G[1])..R[2,1]),2=(y=R[1,2]..op([2,2],G[2])),G)[], labels=["x","y"]);
B:=rectangle(R[1],R[2], style=line);
a:=R[2,1]-R[1,1]; b:=R[1,2]-R[2,2];
l1:=line(R[1]+[0.1*a,-0.3*b],R[1]+[0.4*a,-0.3*b],color=rhs(G[3])[1],thickness=rhs(G[4]));
l2:=line(R[1]+[0.1*a,-0.7*b],R[1]+[0.4*a,-0.7*b],color=rhs(G[3])[2],thickness=rhs(G[4]));
T:=textplot([[(R[1]+[0.75*a,-0.3*b])[],y=f],[(R[1]+[0.75*a,-0.7*b])[],y=g]], font=[times,bold,14]);
display(A1,A2,A3,A4,`if`(nops(R)=2,B,NULL),l1,l2,T);
end proc:


Example of use:

NewLegend1(sin(x),cos(x), [[0.2,0.9],[1.4,0.3]], [x=0..2*Pi, y=-1..1, color=[red,blue], thickness=2, size=[900,400], scaling=constrained, axes=box]);

                

First 35 36 37 38 39 40 41 Last Page 37 of 290