Kitonum

21962 Reputation

26 Badges

18 years, 15 days

MaplePrimes Activity


These are answers submitted by Kitonum

In the example I used the same matrices as Markiyan:

with(LinearAlgebra):

A:=Matrix([[-93, -72], [-76, -2]]):

C:=Matrix([[-98, 57], [-77, 27]]):

E:=Matrix([[-38, 87], [-18, 33]]):

Id:=IdentityMatrix(2):

fsolve(Determinant(A-lambda*C.Id-lambda^2*E.Id), lambda,complex);

           -11.36829371, -.3123524009-1.257844764*I, -.3123524009+1.257844764*I, .8872292854

The next version works:

restart;
for a from 0 to 10 do
A := Matrix([[a, 0], [0, 0]]):
if LinearAlgebra[Equal](A^2, A) then print(a, A) end if;
end do:

r:=[a,b,c]:

[seq(lambda-r[i]^2, i=1..3)];

I assumed that the sign of inequality is >= 0. The following simple procedure solves your problem.

P:=proc(alpha, beta)

if beta=-1 then error "0 in denominator" fi;

if alpha=0 then {k>0} else allvalues(solve({alpha*beta*(1-alpha)*k^(alpha-1)/(1+beta)-1-(2*alpha-1)*alpha*(1-alpha)*beta*k^(2*(alpha-1))/(1+beta)+alpha^2*k^(alpha-1)>=0, k>=0}, k))  fi;

end proc:

Examples:

P(1/2, 3),  P(7, 1/2),  P(3, 5),  P(1, 3);

 

 

M. Hirnyk!
Of course, the eliminate command is not always able to find an explicit equation relating B and A. In this case, the problem can be solved numerically by the following scheme (the simplest way):

1) Construct the plot of the function  B(t)  and on it we find the range in which the function is monotonic.
2) For each value of  B  through some step find the corresponding value of t .

3) Substitute these  t in A (t) .
4) Using these lists we build the plot A (B) .

Solution for your example:

plot(t^5-sin(t)-2, t=0..2, labels=[t,B]);

T:=[seq(fsolve(B = t^5-sin(t)-2, t=0.63..2), B=-2.4..29, 0.1)];

X:=[seq(B, B=-2.4..29, 0.1)];
Y:=[seq(eval( t^3-exp(t)), t in T)];

plot(X, Y, labels=[B,A]);

 

 

You have 2 functions  A=A(t)  and B=B(t) .To plot A in terms of B you should to eliminate the variable  t

An example:

F := eliminate({A = t^3-t, B = t^3-t^2}, t);

plots[implicitplot](op(F[2]), B = -1 .. 1, A = -1 .. 1, scaling = constrained, numpoints = 50000);

 

 

If I understand your question, you need to build a point plot of the function  x->x/(x+1)  for a sets of points  0.5, 0.9, 0.99, 0.999  and  1.001, 1.01, 1.1, 1.5  to illustrate the concept of limit of a function when the variable tends to 1. This can be done as follows

X1, X2 := [.5, .9, .99, .999], [1.001, 1.01, 1.1, 1.5]:

f := x->x/(x+1):

Y1, Y2 := map(f, X1), map(f, X2):

plots[display](plot(X1, Y1, style = point, symbol = solidcircle, color = blue, symbolsize = 8), plot(X2, Y2, style = point, symbol = solidcircle, color = red, symbolsize = 8), view = [0 .. 2, 0 .. 1], scaling = constrained);

 

 

restart;

f := -k*x1(t)+k*(x2(t)-x1(t))-lambda*(diff(x1(t), t)) ;

g := -k*(x2(t)-x1(t));

eq1 := m*(diff(x1(t), t, t))-f = 0;

eq2 := m*(diff(x2(t), t, t))-g = 0;

fcns := {x1(t), x2(t)};

ICS := {x1(0) = 1, x2(0) = 0, D(x1)(0) = 0, D(x2)(0) = 0};

sys := {eq1, eq2}; m := 1; k := 1; lambda := 1;

sysdiff := sys union ICS;

Sol := dsolve(sysdiff, fcns, numeric);

plots[odeplot](Sol, [[t,x1(t)],[t,x2(t)]], t=0..30, color=[red, blue], numpoints=5000, thickness=2);

restart :

f := -k*x1(t)+k2*(x2(t)-x1(t))-lambda*(diff(x1(t), t)):

g := -k2*(x2(t)-x1(t)): fcns := x1(t), x2(t):

eq1 := m*(diff(x1(t), t, t))-f = 0:

eq2 := m*(diff(x1(t), t, t))-g = 0:

ICS := {x1(0) = 1, x2(0) = 0, D(x1)(0) = 0}:

sys := {eq1, eq2}:

m := 1: k2 := 1: k1 := 1: lambda := 1: k:=1:

sysdiff := `union`(sys, ICS):

Sol_N := dsolve(sysdiff, {fcns}, numeric):

plots[odeplot](Sol_N , [x1(t),x2(t)],0..100, numpoints=5000, thickness=2, view=[-0.5..0.5, -0.5..0.5]);

 

 

a[n] is `in` S;

 

 

plot([[4*cos(t), 3*sin(t), t=0..2*Pi], [2*cos(t), 3*sin(t), t=0..2*Pi]], scaling=constrained, color=[red, blue]);

f:=x->x^2+2*x-3:
D(f)(2);

                  6

restart;

L:=[]:

 for A  from .1 by .01 to 3 do

  for B  from .1 by .01 to 3 do

  l1:=(exp(B)-A)-1:

  l2:=(exp(B)-A/2)-1.5:

  if l1>0 and l2>0 then L:=[op(L), [A,B]]: break: end if:

  end do:

 end do:

L; 

In total there are 192 solutions:

with(combinat):

S:=permute(9): L:=[]:

for a in S do

if  a[9] = add(a[2*k-1]/a[2*k], k= 1..4) then L:=[op(L), a]: fi:

od:

nops(L);

                                               192

 

The first solution in the list  L  is Carl's solution, the last is

It is interesting that  there is no solution in which all the fractions are irreducible.

First 267 268 269 270 271 272 273 Last Page 269 of 293