Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are answers submitted by Kitonum

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

dd := ["0101101", "0000001", "0011001", "0000001"];
map(convert, parse~(dd), decimal, binary)

                         [45, 1, 25, 1]

The result can be improved:

with(DirectSearch): with(plots):

 xy := Matrix([[0.2e-1, .158], [0.2e-1, .159], [0.3e-1, .161], [0.3e-1, .164], [0.3e-1, .166], [0.4e-1, .169], [0.6e-1, .173], [0.8e-1, .178], [.1, .185], [.11, .187], [.14, .193], [.19, .2], [.28, .21], [.38, .223], [.44, .233], [.58, .244], [.82, .256], [1.4, .278], [1.71, .281], [1.78, .282], [1.78, .282], [1.81, .282]]):

 X := xy[() .. (), 1]:

 Y := xy[() .. (), 2]:

 f := a+b*x^c+d*x^e:

 sol := DataFit(f, X, Y, x, evaluationlimit=20000):

 f1 := eval(f, sol[2]);

 p1, p2 := pointplot(X, Y), plot(f1, x = 0 .. 2):

 display(p1, p2);

f:= n-> a^n + b^n + c^n:

simplify(f(5), {f(1)=1, f(2)=2, f(3)=3});

                          6

L := [[2, 0], [6, 1], [8, 0]]:   eq := f(x) = a*x^2+b*x+c:

subs(solve({seq(eval(eq, {x = L[i, 1], f(x) = L[i, 2]}), i = 1 .. 3)}), eq);

 

Edit: another variant

L:=[[2,0],[6,1],[8,0]]:   f:= x->a*x^2+b*x+c:

'f'(x)=subs(solve({'f(L[i,1])=L[i,2]' $ i=1..3}), f(x));

Maple does not solve your system, but just repeats the input. He always does this when the system is inconsistent.

Example:

fsolve({x^2+y^2=-1, x+y=1});

               fsolve({x+y = 1, x^2+y^2 = -1},{x, y})

 

Mathematica explicitly says that the system is inconsistent:

In[1]:= NSolve[{(-(1/((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p))))*((0.002 + 0.001)*
Sin[-0.39] - (0.001 + 1*(e + p))*
Cos[-0.39]*(e*(-m + (0.68/d) + (0.599/g)) +
j*m) - (1/((0.002 + 0.001)^2 + (0.001 +
1*(e + p))*(0.001 + 1*(j + p))))*((0.001 + 1*(j + p))*
Sin[-0.39] - (0.002 + 0.001)*
Cos[-0.39])*(j*(-n + (0/i) + (-0.73/l)) +
e*n)))/(2*10) == -0.12, (-((0.002 + 0.001))*
e/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*d)*(e*(-m + (0.68/d) + (0.599/g)) +
j*m) - ((0.001 + 1*(j + p))*
e)/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*d)*(j*(-n + (-0.73/l)) + e*n) + (e*n)/
d)/(2*10) == -0.069, (-((0.002 + 0.001))*
e/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*g)*(e*(-m + (0.68/d) + (0.599/g)) +
j*m) - ((0.001 + 1*(j + p))*
e)/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*g)*(j*(-n + (-0.73/l)) + e*n) + (e*n)/
g)/(2*10) == -0.079, (-(0.001 + 1*(e + p))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*i)*(e*(-m + (0.68/d) + (0.599/g)) +
j*m) - (-(0.002 + 0.001))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*i)*(j*(-n + (-0.73/l)) + e*n) - (j*m)/
i)/(2*10) == -0.003, (-(0.001 + 1*(e + p))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*l)*(e*(-m + (0.68/d) + (0.599/g)) +
j*m) - (-(0.002 + 0.001))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*l)*(j*(-n + (-0.73/l)) + e*n) - (j*m)/
l)/(2*10) == -0.023, -(1*
c*(1/((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p))))*((0.001 + 1*(j + p))*
Sin[-0.39] - (0.002 + 0.001)*Cos[-0.39])*e)/
d == -0.109, -(1*c*(-(0.002 + 0.001))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*i)*e)/d ==
0.0003, -(1*
f*(1/((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p))))*((0.001 + 1*(j + p))*
Sin[-0.39] - (0.002 + 0.001)*Cos[-0.39])*e)/
g == -4.928, -(1*f*(-(0.002 + 0.001))*
j/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*l)*e)/g ==
0.013, -(1*
h*(1/((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p))))*((0.002 + 0.001)*
Sin[-0.39] - (0.001 + 1*(e + p))*Cos[-0.39])*j)/
i == -0.058, -(1*h*((0.002 + 0.001))*
e/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*d)*j)/
i == -0.0005, -(1*
k*(1/((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p))))*((0.002 + 0.001)*
Sin[-0.39] - (0.001 + 1*(e + p))*Cos[-0.39])*j)/
l == -1.39, -(1*k*((0.002 + 0.001))*
e/(((0.002 + 0.001)^2 + (0.001 + 1*(e + p))*(0.001 +
1*(j + p)))*d)*j)/l == -0.011}, {c, d, e, f, g, h, i,
j, k, l, m, n, p}]

Out[1] = {}

 

 

 

 

Easier to solve your problem by  dsolve  command.

 

Finding  f(x)  and construction of the function  f :

restart;

g(x):=1/(1+cot(x)):

dsolve({diff(f(x), x)= g(x), f(Pi/4)=1}, f(x));

assign(%);

f:=unapply(f(x), x);

 

Checking:

f(Pi/4);

is(diff(f(x), x)=g(x));

                               1

                             true

 

 

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