Integration problem, getting wrong answer in matlab
Show older comments
Good morning I have an integration that I need to compute, I used MATLAB but I did not get the right answer.
This is the integral:
exp(-(t-1)^2/(σ^2)) dt
from -Inf to Inf. I am getting that it equals zero which is impossible, can any one help me?
Thank you in advance
Accepted Answer
More Answers (1)
Giuseppe Infantino
on 8 Jan 2020
Guys, I have incredible integration issues, see below:
I need to calculate a difficult integral and I didn't obtain good results, so I try a very simple integral in order to try to understand the problem and as you can see from the code below, Matlab provides a wrong results, beacuse the correct results is (-log(1-x)) and not (-log(x-1)), and for these reasons I'm having lots of troubles in my computations. Honestly, I have no idea about this problem, I even doubts about my capabilty of calculating such a simple integral so that I verify with WolphramAlpha that provides the correct results!
Could someone help me? Thank you very much and sorry for my english.
>>int (1./(1-x), x)
ans =
-log(x-1)
Categories
Find more on Function Creation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!