Kitonum

21845 Reputation

26 Badges

17 years, 230 days

MaplePrimes Activity


These are answers submitted by Kitonum

In this example, it is more convenient to use  surd  command.  surd(a,3)  means  the cubic root in the real domain. The results are displayed in a more compact form.

Compare:

restart;

de := diff(y(x), x) = 3*abs(y(x))^(2/3);

dsolve(de);

                         

 

and

 

restart;

de := diff(y(x), x) = 3*surd(y(x)^2, 3);

dsolve(de);

                                     

 

The latter result can be more simplified to  x - y(x)^(1/3) +_C1 = 0 ,  but Maple does not want to do this.

P:=Matrix([[ 0 , .5 , .5 , 0 , 0 , 0 ], [ 1/3 , 0 , 0 , 1/3 , 1/3 , 0 ], [ 1/3 , 0 , 0 , 0 , 1/3 , 1/3 ], [ 0 , 1 , 0 , 0 , 0 , 0 ], [ 0 , .5 , .5 , 0 , 0 , 0 ], [ 0 , 0 , 1 , 0 , 0 , 0 ]]):

pii:=Vector[row]([ a , b , c , d , e , f ]):

solve({seq(pii.P[i]=pii[i], i=1..6)});

                               {a = f, b = f, c = f, d = f, e = f, f = f}

If I understand the problem, the rotation around the vertical axis.

The plotting of the curve:

plot(1-cos(theta), theta = 0 .. 2*Pi, coords = polar);

 

 

The plotting of the body (for clarity, cutted a piece of the outer surface):

r := 1-cos(theta):

plot3d([r*cos(theta)*cos(phi), r*cos(theta)*sin(phi), r*sin(theta)], theta =0  .. 2*Pi, phi = Pi/2 .. 2*Pi, scaling = constrained,  axes=normal, view=[-2.7..2.7,-2.7..2.7,-1.4..1.4], orientation=[-160,-75,180]);

 

 

The calculations  the volumes of the bodies bounded by the outer and inner surfaces:

int(Pi*(r*cos(theta))^2, theta = (1/2)*Pi .. 3*Pi*(1/2));

int(Pi*(r*cos(theta))^2, theta = -(1/2)*Pi .. (1/2)*Pi);

                              

 

This problem was solved only with the help of  plots[textplot]  command in standard worksheet. The numerator and denominator of the fraction  r  should not be too large (less than 10^9):

 

MixedNumber := proc (r::{integer, fraction})

local a, b, d1, d2;

if r::integer or abs(numer(r)) < denom(r) then

return plots:-textplot([0, .9, r], view = [-1 .. 1, -1 .. 1], font = [TIMES, ROMAN, 18], color = blue, axes = none) else

a := trunc(r); b := `if`(0 < r, r-trunc(r), trunc(r)-r); d1 := `if`(0 < a, length(a), length(a)+1); d2 := max(length(numer(b)), length(denom(b)));

plots:-textplot([[-0.034*(d1-1), 0.9, a], [0.1+0.034*(d2-1), 0.9, b]], view = [-1 .. 1, -1 .. 1], font = [TIMES, ROMAN, 18], color = blue, axes = none) end if;

end proc:

 

Two examples of the work of the procedure:

MixedNumber(17/6);

                                              

MixedNumber(-100001/9971);

                                        

 

 

Vector  v  depends on 6 parameters  A, B, k, t, x, y . The simple procedure  VecPic  plots the vector  v  for specified values of these parameters.

VecPic := proc (A, B, k, t, x, y)

local a, b, c, d;

uses plots;

a := -A*y*exp(-k*t)/(x^2+y^2);

b := A*x*exp(-k*t)/(x^2+y^2);

c := B*t;

d := max(abs(a), abs(b), abs(c));

arrow(<a, b, c>, view = [-d .. d, -d .. d, -d .. d], color = red, scaling = constrained, axes = normal)

end proc:

 

Your example for  t=0, A=1 (I took the the remaining parameters arbitrarily):

VecPic(1, 1, 1, 0, 4, -3);

 

 

If I understand correctly, only zero elements are on the diagonal, and the remaining elements are equal to  0  or   in any combination.

Here is the procedure that builds all such symmetric  n  by  n  matrices:

LM:=proc(n)

local L;

uses combinat; 

L:=permute([1$(n*(n-1)/2), 0$(n*(n-1)/2)], n*(n-1)/2);

[seq(Matrix(n,{seq(seq((i+1,j)=L[k][(i-1)*i/2+j], j=1..i), i=1..n-1)}, shape=symmetric), k=1..nops(L))];

end proc:

 

Example (the first 12 matrices of  2^10  the all ones for  n=5 ):

LM(5)[1..12][];

 

 

 

Example:

with(LinearAlgebra):

A := Matrix(3,4, [[1,2,3,4],[5,6,7,8],[9,0,1,2]]);

SubMatrix(A, [1,2], [2,4]);

 

 

Max:=proc()

local S;

S:=select(t->not type(t, numeric), {args});

if nops(S)=0 then return max(args) else

'procname'(op(S),max({args} minus S)) fi;

end proc:

 

Example:

Max(3, 1, x, 4);

                       Max(x, 4)

 

Carl, your way from a mathematical point of view is incorrect. If a finite set of points on the curve lies in a plane, it does not mean that the entire curve lies in this plane.

Moreover  geom3d[AreCoplanar]  command can cause errors in evident examples. Look 

with(geom3d):
AreCoplanar(point(A1,[1,0,0]), point(A2,[2,0,0]), point(A3,[3,0,0]), point(A4,[1,1,0]));

    Error, (in geom3d:-plane) the points may not be AreCollinear

 

For a curve given by the parametric equations with smooth functions, we can use  Student[VectorCalculus][Torsion]  command.  The quote from Wiki "A plane curve with non-vanishing curvature has zero torsion at all points. Conversely, if the torsion of a regular curve with non-vanishing curvature is identically zero, then this curve belongs to a fixed plane."


Example:

A:=<cos(phi),0,-sin(phi); 0,1,0; sin(phi),0,cos(phi)>:

V:=<cos(t),sin(t),0>:

V1:=A.V;  # Circle  V  rotated through the angle phi around the axis Oy

Student[VectorCalculus][Torsion](V1, t);

 

 

 

After  assign(a, c);  the following two assignments  

assign(a, d);  and   a:=d;  are different things. Compare:

  

assign(a, c);

a := d;  b := 2;

a, b, c;

    a := d

    b := 2

    d, 2, c

plots[polarplot](1/(theta-(1/3)*Pi), theta = 1.5 .. 8);

 

 

 

Edited: this is a spiral. The range for the theta should be taken such that  theta-alpha<>0

 

The simplest way to make the bolding (input or output, or all together) is to select the desired thing by the mouse and press  .

Addition: if you want to make the bolding throughout the worksheet, then instead of a mouse,  first select all in edit menu.

collect(algsubs(1/(T[1]*V[2])=U, B), U);

 

 

 

Only in standard interface:

 

plots[polarplot]((1/6)*Pi, r = 0 .. 3, ordering = [angular, radial]);

 

 

More short code:

L:=select(t->`*`(op(t))<>0 and nops(convert(t, set))=9, [seq(seq(seq([x, y, z, 1+x, 2+y, -3+z,-2+x, 3+y, -1+z ], z=1..9), y=1..9), x=1..9)]);

nops(L);

map(t->{a=t[1..3], b=t[4..6], c=t[7..9]}, L);

 

 

 

First 225 226 227 228 229 230 231 Last Page 227 of 292