Solve Weird Integral: Integrate Piecewise Function?

  • Context: Undergrad 
  • Thread starter Thread starter Feldoh
  • Start date Start date
  • Tags Tags
    Integral
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
Feldoh
Messages
1,336
Reaction score
3
Why does this work?
MainEq1.L.gif


Or maybe a better question is how do you evaluate this integral? Integrate a piecewise function? I tried that an got 0
 
Physics news on Phys.org
You subtracted when you should've added. It's definitely 2.
 
I get [tex]-e^{-x}, x> 0 -- e^x, x<0[/tex] But I'm unsure as how to go about solving that.

I evaluated it like this:

[tex]-e^{-x}|_{x=inf} - e^{x}|_{x=-inf}[/tex] but that's clearly wrong XD
 
Last edited:
an Improper integral

you have to Divide the integral into two
the first is from -∞ to 0 & the second is from 0 till ∞ and
HINT: this is an improper integral, consider taking the limit
for example limC goes to -∞ (of your integral)
lim D goes to ∞ (of your integral).
and continue.:smile:
 
[tex]\int_{-\infty}^{\infty}e^{-|t|}dt=\lim_{a\rightarrow -\infty}\int_{a}^{c}e^{-|t|}dt+\lim_{b\rightarrow \infty}\int_{c}^{b}e^{-|t|}dt[/tex]

Now,

[tex]e^{-|t|}=e^{-t}, t>0[/tex] and [tex]e^{t},t<0[/tex]
YOu can choose c to be any point between negative infinity and positive infinity. Let c=0 so

[tex]\int_{-\infty}^{\infty}e^{-|t|}dt=\lim_{a\rightarrow -\infty}\int_{a}^{0}e^{t}dt+\lim_{b\rightarrow \infty}\int_{0}^{b}e^{-t}dt[/tex]
 
Yeah I figured it out earlier today. You can do that method or since the function is even throw out the absolute value and evaluate the integral from 0 to infinity and multiply by 2.