Kitonum

21435 Reputation

26 Badges

17 years, 26 days

MaplePrimes Activity


These are answers submitted by Kitonum

To solve this equation it is better to use  the Student:-Calculus1:-Roots  command. In your example, it immediately returns all 4 roots in symbolic form (in Maple 2018.2):

Student:-Calculus1:-Roots((x-1)*(x^3-9*x^2+4), x);
evalf(%);
     
          
                          

I confirm this bug in 2d math input in Maple 2018.2. Here is a workaround:


Here is the simplest way to insert a matrix from the keyboard:

<1, 1; 1, 2/3.4>;
                                              


 

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

 

First 94 95 96 97 98 99 100 Last Page 96 of 289