Kitonum

21495 Reputation

26 Badges

17 years, 58 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart;

Sol:=rhs(dsolve(diff(y(x), x, x)+diff(y(x), x)+y(x) = 0)):

y1:=unapply(remove(t->type(t, name), op(1, Sol)), x);

y2:=unapply(remove(t->type(t, name), op(1, Sol)), x);

y:=unapply(C1*y1(x)+C2*y2(x), x);

 

 

eq||1:=a[1]^3+a[2]+a[3]^2+50:

eq||2:=a[1]^2+5*a[2]+a[3]+44:

eq||3:=a[1]+a[2]+a[3]^2+74:

V2:=Vector([seq(selectremove(x->type(x, numeric), eq||i)[1], i=1..3)]);

V1:=Vector([seq(selectremove(x->type(x, numeric), eq||i)[2], i=1..3)]);

 

 

I usually work in the classic interface. First I copy the code to Word, and then from Word to mapleprimes.

Maybe the  LinearAlgebra[GenerateMatrix]  command  will be helpful to you.

Your problem can be solved by the simple procedure. Formal arguments:  f  - your function,  a  and  b  - left and right ends of the range,  n  - the number of subintervals,  S  equals  left, right  or middle. I wrote only for left. The other variants  you can easily make your own.

Riemann:=proc(f, a, b, n, S)

local h;

h:=(b-a)/n;

if S=left then return sum(f(a+k*h)*h, k=0..n-1) fi;

end proc;

 

Examples of work:

Riemann(x->x^3, 0, 1, 10, left);

Riemann(x->x^3, 0, 1, n, left);

limit(%, n=infinity);

 

 

plot([sqrt(x^2-5*x+6)/log[10]((x+10)^2), [-11, t, t = -15 .. 25], [-9, t, t = -15 .. 25]], x = -30 .. 20, -15 .. 25, color = [red, blue, blue], linestyle = [1, 2, 2], tickmarks = [[-30, -20, -11, -9, 2, 3, 20], default], scaling = constrained, discont, numpoints = 10000);

The points of discontinuity of the function are  -11, -10, -9 . The point  -10  is the point of removable discontinuity. In fact, the range is  (-infinity, infinity) . It follows from the values of limits and the continuity of the function in the corresponding intervals:

Range(limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -11, right),  Open(limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -10))) ; 

Range( limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = 2),  limit(sqrt(x^2-5*x+6)/log[10]((x+10)^2), x = -9, right)); 

                                                                  Range(- infinity, Open(0))
                                                                   Range(0,  infinity)

f := x->add(sin(x/(k+1))/k, k = 1 .. 49)+sum(sin(x/(k+1))/k, k = 50 .. infinity):

plot(f, 0..50);

 

 

A:=f(x)+g(y)+x^2+y^3+65:

select(has, A, x);

select(has, A, y);

select(not has, A, {x,y});

 

 

a:=Matrix([[0,0,0,0,0,0,0,1,1,1,1], [0,0,0,1,1,1,1,0,0,0,0], [0,1,1,0,0,1,1,0,0,1,1], [1,0,1,0,1,0,1,0,1,0,1]]):

Seq:=seq(seq(a[i,j], j=1..11), i=1..4);

b:=cat(Seq);  # or

c:=[Seq];

 

 

If we want to use the  Basis  command, without conversion to  R^n  can not do. But this process can be automated with a simple procedure. Formal argument  S - a set or a list of any polynoms or any matrices (all matrices must be of the identical size):

Basises:=proc(S)

local N, n, T, T0, m;

uses LinearAlgebra;

N:=nops(S);

if type(S[1], polynom) then

n:=max(seq(degree(S[k]), k=1..N));

T:=[seq([seq(coeff(S[k], x, m), m=n..0, -1)], k=1..N)];

map(convert, T, Vector);

T0:=Basis(%);

print(convert([seq(add(T0[k][i]*x^(n-i+1), i=1..n+1), k=1..nops(T0))], whattype(S)));

fi;

if type(S[1], Matrix) then

m:=RowDimension(S[1]);  n:=ColumnDimension(S[1]);

T:=[seq([seq(seq(S[k][i,j], j=1..n), i=1..m)], k=1..N)];

map(convert, T, Vector);

T0:=Basis(%);

convert([seq(Matrix(m, n, convert(T0[k], list)), k=1..nops(T0))], whattype(S));

fi;

end proc:

 


Examples:

Basises({x^2+x+4,  x+3,  2*x^2-x-5,  5*x^2+x-7});

Basises({Matrix([[2,3],[5,6]]),  Matrix([[3,2],[0,1]]),  Matrix([[1,1],[0,5]]),  Matrix([[4,3],[0,6]])});

 

 

 

Your system has a lot of solutions, even in a narrow ranges near the origin. See the plot:

h := 1: lamda := 2:

sys:=[100*abs(((1-nc+I*kc)/(1+nc-I*kc)+(nc-I*kc-.518+I*0.23e-1)*exp(-3.14*(I*4)*h*(nc-I*kc)/lamda)/(nc-I*kc+.518-I*0.23e-1))/(1+(1-nc+I*kc)*(nc-I*kc-.518+I*0.23e-1)*exp(-(1/581)*(3.14*(I*4)*2500)*(nc-I*kc))/((1+nc-I*kc)*(nc-I*kc+.518-I*0.23e-1))))^2 = 43.12, 100*abs(((1-nc+I*kc)/(1+nc-I*kc)+(nc-I*kc-.176+I*0.23e-1)*exp(-3.14*(I*4)*h*(nc-I*kc)/lamda)/(nc-I*kc+.176-I*0.23e-1))/(1+(1-nc+I*kc)*(nc-I*kc-.176+I*0.23e-1)*exp(-(1/720)*(3.14*(I*4)*2500)*(nc-I*kc))/((1+nc-I*kc)*(nc-I*kc+.176-I*0.23e-1))))^2 = 44.37]:

plots[implicitplot](sys, kc = -0.1 .. 0.1, nc = -0.5 .. 0.5, color = [red, blue], numpoints = 10000);

 

So, first of all, you need to decide - what the root of you interested. If you interested the root closest to the origin, we can further narrow the range:

plots[implicitplot](sys, kc = 0 .. 0.01, nc = -0.07 .. -0.12, color = [red, blue], numpoints = 10000);

 

 

Using DirectSearch with the  initialpoint  option, you can specify the value of the root.

The last lines of your code should be

E[j] := simplify(fnormal(LinearAlgebra[Eigenvalues](C[j])));

if E[j][1] > E[j][2] then lambda[j] := E[j][2]/(E[j][1]+E[j][2]) else lambda[j] := E[j][1]/(E[j][1]+E[j][2])  end if;

lambda[j];

 end do;

y := x -> 3*x/(x-2):

plots[display](plottools[disk]([3, 9], 0.15, color = red), plot([y(x), 9+(D(y))(3)*(x-3)], x = 2 .. 9, -1 .. 15, color = [blue, green], thickness = 2, linestyle = [3, 1], scaling = constrained));

 

 

eval(implicitdiff(x^2*y-3*y^3*x=0, y, x), {x=3, y=1});

                                             1/6

A:=plot(sin(x), x=-Pi..Pi, thickness=2, scaling=constrained):

plottools[reflect](A, [[0,0], [1,1]]);

First 255 256 257 258 259 260 261 Last Page 257 of 290