ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 10 Mar 2013 23:38:43 +0100Integral help cos and exphttps://ask.sagemath.org/question/9900/integral-help-cos-and-exp/I'm sure this integral has been seen before. I'm trying to do a convolution for optics homework. No answer returns
sage: var('x1, x2, y1, y2, L, z, r')
sage: integral(cos(x1/L)*exp(-i*(k/z)*(x1*x2 + y1*y2)), x1, -L/2, L/2)
thanks for any help!Sun, 10 Mar 2013 21:39:34 +0100https://ask.sagemath.org/question/9900/integral-help-cos-and-exp/Answer by Shashank for <p>I'm sure this integral has been seen before. I'm trying to do a convolution for optics homework. No answer returns</p>
<pre><code>sage: var('x1, x2, y1, y2, L, z, r')
sage: integral(cos(x1/L)*exp(-i*(k/z)*(x1*x2 + y1*y2)), x1, -L/2, L/2)
</code></pre>
<p>thanks for any help!</p>
https://ask.sagemath.org/question/9900/integral-help-cos-and-exp/?answer=14644#post-id-14644It is just a typo. Try the code written below
var('x1, x2, y1, y2, L, z, r, k')
integral(cos(x1/L)*exp(-i*(k/z)*(x1*x2 + y1*y2)), x1, -L/2, L/2)Sun, 10 Mar 2013 23:38:43 +0100https://ask.sagemath.org/question/9900/integral-help-cos-and-exp/?answer=14644#post-id-14644