Frank Benford

45 Reputation

4 Badges

11 years, 320 days

MaplePrimes Activity


These are questions asked by Frank Benford

I've found the Taylor series expansions for two functions.  The two expansions are identical until the third term.  When I subtract one expansion from the other, I expected that the identical terms would cancel and disappear.  But I can't get Maple to do this.  If I copy and paste the output into a Maple command, the "big Oh" terms are not treated correctly.  The correct answer would be (x^3)/6 + O(x^4).  Here's my work:
 

taylor(ln(1+x), x = 0, 4)

series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4)

(1)

taylor(ln(1+sin(x)),x=0,4)

series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4)

(2)

 

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(3)

collect((3),x)

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(4)

x-(1/2)*x^2+(1/3)*x^3+O(x^4)-x+(1/2)*x^2-(1/6)*x^3-O(x^4)

(1/6)*x^3

(5)

x-(1/2)*x^2+(1/3)*x^3+O(x^4)-x+(1/2)*x^2-(1/6)*x^3-O(x^4)

(1/6)*x^3

(6)

``

How can I get Maple to give me the right answer?  I tried various commands (collect, combine, simplify, etc.) but nothing worked.  Also, why do the font and color of my first two commands differ?  Thanks
 

Download Taylor_question.mw

I'm a Maple novice.  I have two questions.  (1) I'm trying to use Maple to confirm some Fourier transforms of selected probability density functions.  In general I've succeeded, but Maple fails to find the Fourier transform of the pdf of a logistic random variable with mean 0.  Please explain how I can get Maple to carry out this request.  I've attached a Maple file with my work to this question.  (2) At several points in my computations, I wish to substitute 2*Pi*xi for omega.  I have an expression containing two omegas.  If I use algsubs(), only one of the two omegas is replaced.  I have to use subs() to replace both omegas.  Why is this?
 

Use Maple to confirm selected Fourier transform of logistic random variable

with(inttrans)

[addtable, fourier, fouriercos, fouriersin, hankel, hilbert, invfourier, invhilbert, invlaplace, invmellin, laplace, mellin, savetable]

(1)

assume(a > 0)

NULL

"f(x):=((e)^(x/(a)))/(a*(1+(e)^(x/(a)))^(2))"

proc (x) options operator, arrow, function_assign; exp(x/a)/(a*(1+exp(x/a))^2) end proc

(2)

int(f(x), x = -infinity .. infinity)

1

(3)

fourier(f(x), x, omega)

fourier(exp(x/a)/(1+exp(x/a))^2, x, omega)/a

(4)

"f(x) := 1/(4*a*(cosh(x/(2*a)))^(2))"

proc (x) options operator, arrow, function_assign; (1/4)/(a*cosh((1/2)*x/a)^2) end proc

(5)

int(f(x), x = -infinity .. infinity)

1

(6)

fourier(f(x), x, omega)

fourier(1/(exp((1/2)*x/a)+exp(-(1/2)*x/a))^2, x, omega)/a

(7)

Wikipedia's article on "Logistic distribution" gives a characteristic function that implies that the Fourier transform of this pdf should equal Pi*a*omega/sinh(Pi*a*omega).

Unit rectangular function

rect := proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

proc (x) options operator, arrow; Heaviside(x+1/2)-Heaviside(x-1/2) end proc

(8)

fourier(rect(a*x), x, omega)

2*sin((1/2)*omega/a)/omega

(9)

algsubs(omega = 2*Pi*xi, 2*sin((1/2)*omega/a)/omega)

2*sin(Pi*xi/a)/omega

(10)

subs(omega = 2*Pi*xi, 2*sin(Pi*xi/a)/omega)

sin(Pi*xi/a)/(Pi*xi)

(11)

``

NULL


 

Download Logistic_pdf.mw

 

In my papers, I frequently use characters surmounted with a symbol, e.g., an "overbar" (used, for example, to denote a sample mean), a caret (or "hat") (used, for example, for Fourier transforms, or estimated value of a parameter), or a tilde.  Can one create surmounted symbols like this in Maple?  If so, please explain how.

I've used fsolve in Maple 6 to find the roots (real and complex) of a polynomial.  I'd like to create a plot showing the location of those roots in the complex plane.  How can I do this?

Page 1 of 1