Kitonum

21435 Reputation

26 Badges

17 years, 26 days

MaplePrimes Activity


These are answers submitted by Kitonum

We look for real solutions. Since the number of unknowns is greater than the number of equations, we set  z =t , where  is any real number. Solving the resulting system, we get an infinite number of complex solutions, depending on  t , some of which may be real. Equating to  0  the imaginary parts, we find  the desired  t .

restart;

z:=t:

Sol:=allvalues(solve({x^2+y^2+z^2=3, x+y+z=3}, {x, y}));

assign(Sol[1]);

solve(Im(x)=0, t), solve(Im(y)=0, t) assuming t::real;

subs(t=1, [x, y, z]);  # Finding real solutions for the first set of the roots

x:='x': y:='y':

assign(Sol[2]);

solve(Im(x)=0, t), solve(Im(y)=0, t) assuming t::real;

subs(t=1, [x, y, z]);  # Finding real solutions for the second set of the roots

In the third line you should replace  v  by  w .

To find the coordinates of a vector  v  in the new basis you need to do two steps:

1) Specify the matrix  A  whose columns are  the coordinates of the basis vectors.

2) Solve the matrix equation  A.X=v where  entries of vector  X  are desired coordinates.

 

The code:

v:= <1,5>; 

A:= <<1,1>|<2,3>>;

X:=LinearAlgebra[LinearSolve](A, v);

 

If parameterization is unknown, and only implicit equation is known, then get the parametric equations as follows:

solve((x^2+y^2)^2=x^2-y^2, {x(s), y(s)});

{x = (1-s^2)^(1/2)/(1+s^2), y = s*(1-s^2)^(1/2)/(1+s^2)}, {x = -(1-s^2)^(1/2)/(1+s^2), y = -s*(1-s^2)^(1/2)/(1+s^2)}

 

To get your parameterization you can make а substitution:

subs(s=sin(t), [%]);

[{x = (1-sin(t)^2)^(1/2)/(1+sin(t)^2), y = sin(t)*(1-sin(t)^2)^(1/2)/(1+sin(t)^2)}, {x = -(1-sin(t)^2)^(1/2)/(1+sin(t)^2), y = -sin(t)*(1-sin(t)^2)^(1/2)/(1+sin(t)^2)}]

u:=unapply(sum((10^k-1)*7/9, k=1..n), n);

   u := n -> -7/9*n-70/81+7/81*10^(n+1)

First, we isolate the N and then find it by bisection of the interval.

restart;

f:=N->sum(1/n, n=1..N):

for k from 0 do

if evalf(f(2^k))>20.12 and  evalf(f(2^(k-1)))<20.12 then break: fi:

od:

a:=2^(k-1): b:=2^k: 

print([a, b]);    # isolation interval

while b-a>=1 do

c:=(a+b)/2:

if (evalf(f(a))-20.12)*(evalf(f(c))-20.12)<=0 then b:=c else a:=c fi:

od:

if evalf[20](f(ceil(b)-1))<=20.12 then print(N=ceil(b)) else

print(N=ceil(b)-1); fi;

                                    [268435456, 536870912] 

                                             N = 307130819

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);

First 273 274 275 276 277 278 279 Last Page 275 of 289