Kitonum

21550 Reputation

26 Badges

17 years, 124 days

MaplePrimes Activity


These are answers submitted by Kitonum


 

NULL

NULL

restart

NULL

Digits := 20

20

(1)

``

``

NULL

c := .95

.95

(2)

NULL

theta := .9

.9

(3)

k := 1.

1.

(4)

p_l := 10^(-15.)

0.10000000000000000000e-14

(5)

n := 10^10.

10000000000.

(6)

NULL

fsolve(c = p_l^k*(1-p_l)^(n-k)*theta/(p_l^k*(1-p_l)^(n-k)*theta+p^k*(1-p)^n*(1-theta)), p = 1.09*10^(-10) .. .1)

0.14965925863591907056e-8

(7)

NULL

NULL

NULL

``

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL

NULL


 

Download test_(4)_new.mw

The functions and the colors should be specified as lists not sets:

w:=x+I*y:
plots[implicitplot]([Im(w) = 2, Re(w) = 2], x = -5 .. 5, y = -5 .. 5, color = ["Blue", "Red"]) ; 


I do not use 2D math input at least because the code typing in it takes more time.

Kollect:=proc(L::set, n::posint)
uses combinat;
`+`(seq(`+`(mul~(choose(L minus {i},n))[])*i^n, i=L));
end proc:

Examples of use:
Kollect({i1, i2, i3, i4}, 2);
Kollect({a, b, c, d, e}, 3);

 

simplify(a, {alpha^2=0});

You can prevent automatic fraction reduction using inert  sqrt :

%sqrt(x)/x;
value(%); 
                                        

 

This is probably due to rounding errors. If you increase  Digits , the plots are identical:

restart;
Digits:=50:
plot(sqrt(Pi/(2*x))*BesselJ(3+1/2, x), x = 0 .. 0.5e-1);
plot(sqrt(Pi/(2*x))*BesselJ(3+.5, x), x = 0 .. 0.5e-1);

 

Perhaps this is a bug. As a workaround use  CurveFitting:-LeastSquares  instead:

CurveFitting:-LeastSquares(pts1, pts2, x, curve = 3*x+a);
                                   
 -61/3+3*x

restart;

Ec := (Ems+I*Eml)*(1+((Ems+I*Eml)/Ef-1)*Zeta*phi/((Ems+I*Eml)/Ef+Zeta))/(1-((Ems+I*Eml)/Ef-1)*phi/((Ems+I*Eml)/Ef+Zeta));

a:=simplify(Re(Ec)) assuming positive;
b:=simplify(Im(Ec)) assuming positive;

a  and  b  are the real and imaginary parts of  Ec .


 

restart

A := binomial(n, k)

`assuming`([limit(A*(lambda/n)^k*(1-lambda/n)^(n-k), n = infinity)], [lambda > 0, lambda < n, k::posint])

lambda^k/(GAMMA(k)*k*exp(lambda))

(1)

simplify(convert(%, factorial))

lambda^k*exp(-lambda)/factorial(k)

(2)

`assuming`([limit(eval(A*(lambda/n)^k*(1-lambda/n)^(n-k), k = 0), n = infinity)], [lambda > 0, lambda < n])

exp(-lambda)

(3)

``


 

Download Poisson.mw

Edit.


 

restart

A := binomial(n, k); assume(p >= 0, p <= 1)

binomial(n, k)

(1)

E := sum(A*p^k*(1-p)^(n-k)*k, k = 0 .. n)

(p/(1-p)+1)^n*p*n*(1-p)^n/((1-p)*(p/(1-p)+1))

(2)

E := simplify(E)

p*n

(3)

simplify(sum(A*p^k*(1-p)^(n-k)*(k-E)^2, k = 0 .. n))

-p*n*(-1+p)

(4)

subs(-1+p = -q, %)

p*n*q

(5)

NULL


 

Download simpl_new.mw


Edit.

You can easily get the explicit formula for this sequence:

rsolve({y(0)=(-sqrt(5)+5)*(1/8), y(n)= 4*y(n-1)*(1-y(n-1))}, y(n));


 

restart;
A[0] := 0;                      
A[1] := sqrt(2*(k[1]^2-w[1]^2))/n;
A[2] := sqrt(2*(k[2]^2-w[2]^2))/n;
c[1] := 1;
c[2] := 1;
c[3] := 1;
c[4] := 1;
c[5] := 1;
c[6] := 1;
k[1] := 10.5;
k[2] := 3.5;
w[1] := 5.05;
w[2] := .5;
m := 1.9;
n := 1.75;
xi[1] := -t*w[1]+x*k[1];
xi[2] := -t*w[2]+x*k[2];
a := m/sqrt(2*(k[1]^2-w[1]^2));
b := m/sqrt(k[2]^2-w[2]^2);
g := a*(c[2]*exp(a*xi[1])+c[3]*exp(-a*xi[1]));
h := c[1]+c[2]*exp(a*xi[1])+c[3]*exp(-a*xi[1]);
G := b*(c[5]*exp(b*xi[2])+c[6]*exp(-b*xi[2]));
H := c[4]+c[5]*exp(b*xi[2])+c[6]*exp(-b*xi[2]);
u := A[0]+A[1]*g/h+A[2]*G/H;

0

 

(2*k[1]^2-2*w[1]^2)^(1/2)/n

 

(2*k[2]^2-2*w[2]^2)^(1/2)/n

 

1

 

1

 

1

 

1

 

1

 

1

 

10.5

 

3.5

 

5.05

 

.5

 

1.9

 

1.75

 

-5.05*t+10.5*x

 

-.5*t+3.5*x

 

.1459402733

 

.5484827558

 

.1459402733*exp(-.7369983802*t+1.532372870*x)+.1459402733*exp(.7369983802*t-1.532372870*x)

 

1+exp(-.7369983802*t+1.532372870*x)+exp(.7369983802*t-1.532372870*x)

 

.5484827558*exp(-.2742413779*t+1.919689645*x)+.5484827558*exp(.2742413779*t-1.919689645*x)

 

1+exp(-.2742413779*t+1.919689645*x)+exp(.2742413779*t-1.919689645*x)

 

7.439442594*(.1459402733*exp(-.7369983802*t+1.532372870*x)+.1459402733*exp(.7369983802*t-1.532372870*x))/(1+exp(-.7369983802*t+1.532372870*x)+exp(.7369983802*t-1.532372870*x))+2.799416849*(.5484827558*exp(-.2742413779*t+1.919689645*x)+.5484827558*exp(.2742413779*t-1.919689645*x))/(1+exp(-.2742413779*t+1.919689645*x)+exp(.2742413779*t-1.919689645*x))

(1)

plot3d(u, x = -20 .. .20, t = -20 .. .20);
t := 0;
plot(u, x = -15 .. 15);
 

 

0

 

 

 


 

Download plots.mw

And what if you just write a single line of code that does the same thing without any packages and plot components :

Explore(plot(sin(a*x)+cos(b*x^2), x=0..10, -3..3), a=0..1., b=0..1.);
                    

 

I removed the square brackets that you use to group expressions. To do this, Maple should use only parentheses. Brackets are used to create lists. Some corrections were also made to improve the quality of the graphs:


 

restart;
A[0] := 0;                           
A[1] := sqrt(2*(k[1]^2-w[1]^2))/sqrt(lambda);                             
A[2] := sqrt(2*(k[2]^2-w[2]^2))/sqrt(lambda);                             
c[1] := 1;
c[2] := 1;
c[3] := 1;
c[4] := 1;
c[5] := 1;
c[6] := 1;
k[1] := 10.5;
k[2] := 3.5;
w[1] := 5.05;
w[2] := .5;
m := 1.9;
lambda := 1.75;
xi[1] := -t*w[1]+x*k[1];
xi[2] := -t*w[2]+x*k[2];
a := m/sqrt(k[1]^2-w[1]^2);
b := m/sqrt(k[2]^2-w[2]^2);
g := a*(c[2]*cos(a*xi[1])-c[3]*sin(a*xi[1]));
h := c[1]+c[2]*sin(a*xi[1])+c[3]*cos(a*xi[1]);
G := b*(c[5]*cos(b*xi[2])-c[6]*sin(b*xi[2]));
H := c[4]+c[5]*sin(b*xi[2])+c[6]*cos(b*xi[2]);
u := A[0]+A[1]*g/h+A[2]*G/H;
  

0

 

(2*k[1]^2-2*w[1]^2)^(1/2)/lambda^(1/2)

 

(2*k[2]^2-2*w[2]^2)^(1/2)/lambda^(1/2)

 

1

 

1

 

1

 

1

 

1

 

1

 

10.5

 

3.5

 

5.05

 

.5

 

1.9

 

1.75

 

-5.05*t+10.5*x

 

-.5*t+3.5*x

 

.2063907138

 

.5484827558

 

.2063907138*cos(1.042273105*t-2.167102495*x)+.2063907138*sin(1.042273105*t-2.167102495*x)

 

1-sin(1.042273105*t-2.167102495*x)+cos(1.042273105*t-2.167102495*x)

 

.5484827558*cos(.2742413779*t-1.919689645*x)+.5484827558*sin(.2742413779*t-1.919689645*x)

 

1-sin(.2742413779*t-1.919689645*x)+cos(.2742413779*t-1.919689645*x)

 

9.841457496*(.2063907138*cos(1.042273105*t-2.167102495*x)+.2063907138*sin(1.042273105*t-2.167102495*x))/(1-sin(1.042273105*t-2.167102495*x)+cos(1.042273105*t-2.167102495*x))+3.703280398*(.5484827558*cos(.2742413779*t-1.919689645*x)+.5484827558*sin(.2742413779*t-1.919689645*x))/(1-sin(.2742413779*t-1.919689645*x)+cos(.2742413779*t-1.919689645*x))

(1)

plot3d(u, x = -10 ..0.2, t = -10 .. 0.2, view=-50..50, grid=[200,200]);
 

 

plot(eval(u,t=0), x = -15 .. 15, -50..50, numpoints=5000, discont, size=[800,400]);

 

 


 

Download 2plots.mw

is(expand(B*exp(I*Pi/3))=expand(A));
                                                                   
 true

# Or

factor(expand(A/B));
polar(%);


Edit.
 

First 95 96 97 98 99 100 101 Last Page 97 of 290