vv

12453 Reputation

19 Badges

9 years, 285 days

MaplePrimes Activity


These are answers submitted by vv

You cannot replace _Z in a RootOf unless you also insert the new variable (otherwise a syntax error appears).
So,   RootOf(f(_Z))  -->  RootOf(f(n),n)

It it easy to do this, but it's useless because RootOf(f(n),n)  will be simplified automatically to the _Z version.

You are not allowed to expand like this. Actually the double sum, triple sum etc are all infinite, so the "resulting series" would be 1 - oo + oo - oo +  ...

As shown in another answer the product is "telescoping", hence easy to compute.
For other situations one may use the fact that for 0 < a(n)<1,
product(1 - a(n), n=1..infinity) = 0   iff   sum(a(n), n=1..infinity) = infinity. 

There is probably a copy&paste problem: args(k) should be args[k]
(or better  l := [args]).

You also have a syntax error in f()  [a ":" after proc()  not accepted in 1d].

But the main problem is that Object||n  are global symbols not the same with your local Object1,...

 

sys:=
[3*v^2-v*t*(v^2+3)-3*w^2+w*t*(w^2+3),v*(p*v^2+3)/(3*v^2+1)-w*(p*w^2+3)/(3*w^2+1),2*t-v*(p*v^2+3)/(3*v^2+1)-w*(p*w^2+3)/(3*w^2+1)]:
S:=unapply(sys,t):
P:=t -> eval(p,fsolve(S(t))):
plot(P, 0..2);

SolveTools:-SemiAlgebraic and some other commands in SolveTools (which are called by solve for inequalities) do not like infinity (==> errors).  Actually infinity is never needed here.

Edit. Here is a short procedure to remove the useless infinities:

CleanInfty:=proc(L::{list,set}(relation))
map(
  proc(r) local u; 
    if not has(r,infinity) then return r fi;
    u:=eval( r, (indets(r)=~0) );
    if is(u) then u:=NULL else u:=0<0 fi;
  end, L)
end;

Example:

S:={x<>10, -infinity<x , x<infinity, -infinity<y, y<infinity, x>-2}:
solve(CleanInfty(S), {x,y});
#SolveTools:-SemiAlgebraic(S,{x,y});

      {y = y, 10 < x},  {y = y, -2 < x, x < 10}

 

int((1-(-1)^floor(u))/(2*u^2), u = 1 .. X) assuming X>3:
limit(%, X=infinity);

          ln(2)

binomial(m,k)*a^(m-k)

The numerical integration routine for

 

is fooled by the fact that the integrand is 0 in the intervals [2k, 2k+1)  and stops the summation too early.


 

When you approximate a function using a series expansion you must consider
1. The order of the expansion
2. The precision needed for the wanted accuracy.

 

You cannot choose these elements at random!

   

restart;

f:=(Z,r,p,n,i) ->
hypergeom([3/2-n-2*i, 1/2], [3/2], Z^2/(Z^2+p^2+r^2)); #Z := 10; r := 4,  p=-2..2, n=3, i=0..infinity

proc (Z, r, p, n, i) options operator, arrow; hypergeom([3/2-n-2*i, 1/2], [3/2], Z^2/(Z^2+p^2+r^2)) end proc

(1)

g:=(Z,r,p,n,i,qmax) ->    # approx for f
Sum(pochhammer(3/2-n-2*i, q)*(Z^2)^q/(factorial(q)*(1+2*q)*(Z^2+p^2+r^2)^q), q = 0 .. qmax);

proc (Z, r, p, n, i, qmax) options operator, arrow; Sum(pochhammer(3/2-n-2*i, q)*(Z^2)^q/(factorial(q)*(1+2*q)*(Z^2+p^2+r^2)^q), q = 0 .. qmax) end proc

(2)

f(10,4,1,3,10):   evalf[20](%);
g(10,4,1,3,10,30):evalf[20](%);

.20321659074231552810

 

.20321659074213582777

(3)

f(10,4,1,3,15):   evalf[20](%);
g(10,4,1,3,15,30):evalf[20](%);

.16879768595171717449

 

.16956416260616846521

(4)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,30):evalf[20](%);

.13261487452222538864

 

9676581243.0583101579

(5)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,50):evalf[10](%);

.13261487452222538864

 

.2753062248

(6)

f(10,4,1,3,25):   evalf[20](%);
g(10,4,1,3,25,50):evalf[20](%);

.13261487452222538864

 

.13264090926789665225

(7)

 

 

map(min, M, 20);

or maybe

map[inplace](min, M, 20);

 

You have used distinct strange names in the two files:

`#mover(mi("&Xi;"),mo("&uminus0;"))`
and
`#mover(mi("&Xi;",fontstyle = "normal"),mo("&uminus0;"))`;

I'd suggest to avoid in the future such names in files (you cannot see them properly in 2d input!).
The fix is simple:
 

restart;
read "sai.m";
`#mover(mi("&Xi;"),mo("&uminus0;"))`:
`#mover(mi("&Xi;",fontstyle = "normal"),mo("&uminus0;"))`:=%:
read "TKtm.m";
TKtm;

      0.106923339809255e-6*(diff(tau[1](t), t))^2

printlevel := 2; 
Equation := 4;
for i from 0 to Equation do 
for j from 0 to Equation do 
  C[i,j]:=coeff(coeff(H1,x,i),y,j)
end do end do;

 

The documentation says (see ?_):

Any symbol beginning with an underscore (_) is effectively reserved for use only by library code. It is not available to users. Failure to observe this rule can lead to unexpected results.

p:=2*yd[0]*k[a1]*k[d1]*ya[1]+(alpha*C[T]*k[a1]*k[m]-alpha*R[b]*k[a1]*k[d1]-alpha*R[m]*k[a1]*k[d1]-alpha*k[d1]*k[m])*ya[1]-2*k[a1]*k[d1]*yd[1]*yd[0]+(-alpha*C[T]*k[a1]*k[m]+alpha*R[b]*k[a1]*k[d1]+alpha*R[m]*k[a1]*k[d1]+alpha*k[d1]*k[m])*yd[1]:

sort([coeffs(p, indets(p, {ya[integer],yd[integer]}))], length)[1];

 

P:=[
y[a0]-y[d0],
k[d1]*y[a1]-k[d2]*y[d2],
k[d1]*y[a1]*x[1]-k[d2]*y[d2]*x[2]
]:

remove(has, subsindets(P, specindex(integer,x), _XX), _XX);
First 58 59 60 61 62 63 64 Last Page 60 of 111