Kitonum

21525 Reputation

26 Badges

17 years, 75 days

MaplePrimes Activity


These are answers submitted by Kitonum

Apparently all the real roots of the equation are in the range  x=-3..3 .

Look at this:

plot([3*sin(x^2), x], x=-3.5..3.5);

These roots can be found by  RootFinding[Analytic]  command.

Instead of nested loops, you can use the composition operator:

S:={1, 2, 3}: l:=5:

f:=T->[seq(seq([op(T[j]), S[i]],i=1..nops(S)), j=1..nops(T))]:

L:=(f @@ l)([[]]);

You get a list of lists . But any list could easily be converted into a vector, for a example:

convert(L[100], Vector);

 

 

V:=Vector([seq(i, i=1..12)]):

L:=convert(V, list):

Matrix(3, 4, L);

HA := Matrix(2, {(1, 2) = f},shape = hermitian);

HAA := Matrix(4, {op(op(HA)[3]), (1, 3) = -t, (2, 4) = -t, (3, 4) = f}, shape = hermitian);

L:=[]:

for a to 20 do

for b to 20 do

if type(a/b, integer) then L:=[op(L), [a, b]]: fi:

od: od:

L;

(a/a)/expand((a+b)/a);

Possible variant:

P:=proc(L::list)

local T, S, a, U, i;

T:=L; S:=[];

while nops(T)>0 do

a:=T[1]; S:=[op(S), a];  U:=[];

for i to nops(T) do

if T[i]=a then U:=[op(U), i]; fi;

od;

T:=subsop(seq(U[k]=NULL, k=1..nops(U)), T);

od;

S;

end proc;

 

Example:

 L:=[1, 5, 4, 1, 2, 4, 5, 1, 6]:

P(L);

    [1, 5, 4, 2, 6]

Draw a circle and parallel lines can be a variety of ways:

1) By plot command.

2) By plots[implicitplot] command if the lines are given as  implicit functions.

3) Using the primitives of the plottools package.

Read help on these commands!

with(Statistics):

X := RandomVariable(Normal(64.3,2.6)):

PDF(X, x); # Probability density function

int(%, x=-infinity..56.5);

This can be done without loops as follows:

DetVanMat:=proc(A::list)

local B;

B:=combinat[choose]({seq(i, i=1..nops(A))}, 2);

mul(A[B[k,2]]-A[B[k,1]], k=1..nops(B));

end proc;

 

Example:

DetVanMat([seq(x[i], i=1..4)]);

      (x[2]-x[1])*(x[3]-x[1])*(x[4]-x[1])*(x[3]-x[2])*(x[4]-x[2])*(x[4]-x[3])

The procedure finds the Nth term of the sequence of lists defined by the recurrence

f(0)=[0., 0]

f(n)=[f(n-1)[1]+1/n, n]

in lines:

1)   ftn:=arg[1];

2)  srtpt:=args[2];

3)  print('please change another starting point');

4)  error solution 'not' found;  

  

Right-click on the animation and choose  Export As -> GIF .  The created file can look in any modern browser or player, or download here as below:

plots[animate](plot, [a*(2*x^3 + x^2 - 3*x), x=-2..2, thickness=2], a=1..10, frames=100 );

r :=t->(cos(t)+t*sin(t))*i+(sin(t)-t*cos(t))*j+5*k:

 D(r)(t);  # Vector T

r1 := t->(3*cos(t))*i+(3*sin(t))*j+2*t^(3/2)*k:

D(r1)(t):

 int(sqrt(coeff(%, i)^2+coeff(%, j)^2+coeff(%, k)^2), t=0..3);  # Length of the curve

                t cos(t) i + t sin(t) j

                           14

First 274 275 276 277 278 279 280 Last Page 276 of 290