Integral of a gaussian function wrong answer
显示 更早的评论
I am trying to calculate the integral of the following Gaussian function:
syms x A
assume(x,'real');
assume(A,'real');
assumeAlso(A>0);
% Expression to integrate
eq = x^14*exp(-x^2/2)*exp(-A*x);
% Integration
ans = int(eq,x,-inf,inf)
Matlab gives me an answer containing hypergeo and erf. However, there is a regular algebraic solution without the needs of hypergeo or erf. (For example type "integral of (x^14*exp(-x^2/2)*exp(-A*x)) from -inf to inf" into wolfram alpha to get algebraic solution)
Is there a way to get to the algebraic answer in Matlab?
采纳的回答
更多回答(1 个)
Matthias Freiherr von Andrian-Werburg
2017-7-13
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!