integrate with sine constant

291 days ago by jan

var('a b c x', domain='real') A = (sin(a) * x^2+sin(b) *x + sin(c)) * exp(-x^2) Aint = A.integrate(x,-infinity,infinity) pretty_print (A.imag()) pretty_print (A.imag().simplify_full()) pretty_print (Aint.imag().simplify_full()) # correct, but Aint.imag() should simplify to 0 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}-\frac{1}{2} \, {\left(\sin\left(2 \, c\right) \sin\left(c\right) + \cos\left(2 \, c\right) \cos\left(c\right) - \cos\left(c\right)\right)} \sqrt{\pi}
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}-\frac{1}{2} \, {\left(\sin\left(2 \, c\right) \sin\left(c\right) + \cos\left(2 \, c\right) \cos\left(c\right) - \cos\left(c\right)\right)} \sqrt{\pi}
var('a b c x', domain='real') B = (a * x^2+b *x + c) * exp(-x^2) Bint = B.integrate(x,-infinity,infinity) pretty_print (B.imag()) pretty_print (Bint.imag().simplify_full()) # correct, generalization of A 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0