Axel Vogt

5936 Reputation

20 Badges

20 years, 249 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are answers submitted by Axel Vogt

Sum(a(k)*sin(-I*k*x),k = 1 .. infinity), where a is the function (=sequence) for the coefficients, -I = 1/I
eval( someSolution, _C1 = 0) Just a note: try to avoid indexing, expressions like T[tot] or T[1] ... may become cumbersome
hm ... it does not depend on a = 2 or not, it is simply that the integrand has a pole for such an a (where it does not matter if you take your original problem or that with changed variables) it is (more or less) the same as integrating 1/x from some negative up to some positive value BTW: it is *really* nice how Maple answers the problem!
try the following to find an explanation:

  Int(1/((1+a*y)*(1-y^2)^(1/2)),y = 0 .. 1); 
  subs(a=-2,%);
  plot( op(%));

and 

  Int(1/((1-2*y)*(1-y^2)^(1/2)),y = 0 .. 1/2); value(%);
  Int(1/((1-2*y)*(1-y^2)^(1/2)),y = 1/2 .. 1); value(%);
hm, i know it is off the topic, but i find it funny that the OP was able to change the font for the thread title ...
for me it works, try the appended sheet Download 102_invert_piecewise_function.mws
View file details
may be Maple has problems to solve + express the conditions and the following helps? call your expression 'expr'.
 E:=[op(expr)]:
 L:=[0 $ nops(E)]:
 
 for i from 1 by 2 to nops(E) - 1 do
   L[i+1]:=solve( expr =y, x) assuming E[i]:
   L[i]:=eval(E[i], x=%):
 end do:
 
 x = piecewise(op(L));
 plot(rhs(%), y= -10 .. 200);
well, x=50 enforces the expression to be constant, it equals 150 - 50 = 100 and with that formulation it is only defined for x=50 ...
it would be not a bad idea to add comments in the online which conventions are used for special functions ... if I remember correctly there are also differences between A & S and Gradsteyn & Ryzhik ... it would at least save the time to look it up
use a matrix instead of C style and provide bounds
while searching for a Burgundy (in vain) I found, what I filed once (from an economic lecturer):
Suppose I have n observations from a Normal distribution with unknown
mean mu and standard deviation sigma. 

Let SUM be the sum of the observations. Consider one observation, X1:

E[(X1 - SUM/n)^2] = E([X1 - X1/n - (SUM - X1)/n]^2)
= E([(n - 1)*X1/n - (SUM - X1)/n]^2)
= (n - 1)^2*E(X1^2)/n^2 - 2*(n - 1)*E(X1)*E(SUM - X1)/n^2 + E[(SUM - X1)^2]/n^2
= [(n - 1)^2*(s^2 + m^2) - 2*(n - 1)^2*m^2 + (n - 1)*s^2 +(n - 1)^2*m^2]/n^2
= (n - 1)*s^2/n

When I add n of these expectations together, the expectation of the sum is 
(n - 1)*s^2. Divide by n - 1 and you have an unbiased estimate of the variance
(that is an estimate whose expected value equals the variance). The math is a 
bit tedious, but each step should be perfectly straightforward.

If you insist on a word explanation, note that the sample mean is the value that
minimizes the sample variance (another straightforward math problem to prove). 

Therefore the expected standard deviation has to be higher than the sample 
standard deviation computed using the sample mean (of course, if you know the 
distribution mean, this logic doesn't apply and you should divide by n instead 
of n-1). 

Aaron Brown 

Hope that explanation is of interest.
'sum(binomial(2*k,k)*x^k,k=1..n)';
'eval(%,x=1)';
evalc(%);
subs(eq, %);
E:=combine(%,GAMMA);

               n
              4  hypergeom([1, -n], [1/2 - n], 1/4) GAMMA(1/2 + n)
    E := -1 + ----------------------------------------------------
                                 1/2
                               Pi    GAMMA(n + 1)

where the equation eq comes from Abramowitz & Stegun for 1/z, it is

eq:= hypergeom([1, n+3/2],[n+2],4) = 
  -1/4*hypergeom([1, -n],[-n+1/2],1/4)*(n+1)/(n+1/2)
  -1/3*I*3^(1/2)*2^(-2-2*n)*Pi^(1/2)*GAMMA(n+2)/GAMMA(n+3/2);

Then check it for some n, say the first 10:

for i from 1 to 10 do
  simplify(eval(E, n=i)), (add(binomial(2*k,k)*1^k,k=1..i)); 
end do; i:='i':


Edited to add: Maple seems not to simplify the later hypergeometric
to a polynomial in an automatic way, but do it manually: convert it
to a Sum and use pochhammer(-n,n+1) = 0 to cut off the series.

hypergeom([1, -n], [1/2 - n], 1/4);
convert(%,Sum): subs(_k1=k,%): convert(%,GAMMA);
subs(infinity=n+1,%):
simplify(%);
eq2:=hypergeom([1, -n], [1/2 - n], 1/4) = %;


  eq2 := hypergeom([1, -n], [1/2 - n], 1/4) =

                 /n + 1                        \
                 |-----                    (-k)|
               n | \    pochhammer(-n, k) 4    |
        Pi (-1)  |  )   -----------------------|
                 | /      GAMMA(k + 1/2 - n)   |
                 |-----                        |
                 \k = 0                        /
        ----------------------------------------
                     GAMMA(1/2 + n)

-1+4^n*hypergeom([1, -n],[1/2-n],1/4)/Pi^(1/2)*GAMMA(1/2+n)/GAMMA(n+1);
subs(eq2,E);
simplify(%);
expand(%);
E2:=combine(%,GAMMA);


                             /n + 1                        \
                             |-----                    (-k)|
                   1/2     n | \    pochhammer(-n, k) 4    |  n
                 Pi    (-1)  |  )   -----------------------| 4
                             | /      GAMMA(k + 1/2 - n)   |
                             |-----                        |
                             \k = 0                        /
      E2 := -1 + ----------------------------------------------
                                  GAMMA(n + 1)


which is some 'simple' form.


Edited to add: for the last steps one has to use assume(n::posint);

if you have 1.0/4.0 the compiler will treat it like 0.25 anyway, but for 1/4 take care for type conversion
if that plot is ok for this value you can use subs(Pi=Pi + 1e-12, %)
Actually I am a bit astonished: you want to write a thesis and instead of scanning your literature for methods and models you ask for software? If your terminus is standard than even Google might help and already the first entry leads to Wikipedia ... Anyway ... if I recall readings & discussions in Economics vaguely but correctly the magic word is utility function and you want to estimate a pdf from 'bins', your 'extremes' stand for the tails. You have to decide for models (plus have in mind what J Tarr told you), software is the least aspect ... Hope it helps ...
First 85 86 87 88 89 90 91 Page 87 of 93