Integral of a multi-part function
I have two functions
=\left\{\begin{array}{ccc}\sqrt{t^2+2\pi t + \pi^2} &\mbox{ if }& t < -\pi \\ \cos{\left(\frac{\pi}{2} - t\right)} & \mbox{ if }& -\pi\leq t \leq \frac{\pi}{2}\\ 1 &\mbox{ if }& t > \frac{\pi}{2} \end{array}\right.)
=\int_0 ^x f(t) dt \ \ \ \ -\infty < x < \infty)
I need to write S(x) without the integral sign.
My attempt
I started by trying to find the primitive functions for each part
1.a
^2}= \frac{1}{2}(t+\pi)^2 +C)
2.a
} dt=\int \sin{t} dt = -\cos{t} + C)
3.a

Now what confuses me a bit is what integrating from 0 to x actually means in this case. Does it just mean that I integrate for the defined interval in each case? Or do I actually calculate things like 1.b here:
1.b
![\frac{1}{2}\left[(t+\pi)^2\right]_0 ^x = \frac{1}{2}\left( (x+\pi)^2 - \pi^2 \right)=\frac{1}{2}(x^2+2\pi x)](http://latex.codecogs.com/png.latex?\frac{1}{2}\left[(t+\pi)^2\right]_0 ^x = \frac{1}{2}\left( (x+\pi)^2 - \pi^2 \right)=\frac{1}{2}(x^2+2\pi x))
I am also supposed to plot S(x), so I would like to grasp how it works/what it looks like. Right now I just cannot get my head around this.
Any help appreciated.
Re: Integral of a multi-part function
Re: Integral of a multi-part function
Re: Integral of a multi-part function
Quote:
Originally Posted by
sugarmuffin
So a different way to express f(t) could be like below?
=\left\{\begin{array}{ccc} \pi - t &\mbox{ if }& t < -\pi \\ \sin{t} & \mbox{ if }& -\pi\leq t \leq \frac{\pi}{2}\\ 1 &\mbox{ if }& t > \frac{\pi}{2} \end{array}\right.)
You have a mistake in the first line.
=\left\{\begin{array}{ccc} -\pi - t &\mbox{ if }& t < -\pi \\ \sin{t} & \mbox{ if }& -\pi\leq t \leq \frac{\pi}{2}\\ 1 &\mbox{ if }& t > \frac{\pi}{2} \end{array}\right.)
Re: Integral of a multi-part function
Right, I don't know how I missed that.
Then
 dt = \int_0 ^{-\pi} f(t) dt + \int_{-\pi} x f(t) dt)
![= \left[-\pi t\right]_0 ^{-\pi}-\frac{1}{2}\left[t^2\right]_0 ^{-\pi}+\left[-\pi t\right]_{-\pi} ^x -\frac{1}{2}\left[t^2\right]_{-\pi} ^x = -\pi x - \frac{1}{2} x^2](http://latex.codecogs.com/png.latex?= \left[-\pi t\right]_0 ^{-\pi}-\frac{1}{2}\left[t^2\right]_0 ^{-\pi}+\left[-\pi t\right]_{-\pi} ^x -\frac{1}{2}\left[t^2\right]_{-\pi} ^x = -\pi x - \frac{1}{2} x^2)
Pretty sure that part is correct now. But I am still a bit confused. Was the second part of my last post correct? The assumption that the part for 2.a would look like below?
 dt = \int_0 ^{-\pi} f(t) dt + \int_{-\pi} ^{\frac{\pi}{2}} f(t) dt + \int_{\frac{\pi}{2}} ^x f(t) dt)
Re: Integral of a multi-part function
Attempt 3
I've ended up with this
=\left\{\begin{array}{ccc}-\pi x - \frac{1}{2}x^2 & \mbox{ if } & x < -\pi \\ 1-\cos{x} & \mbox{ if } & -\pi \leq x \leq \frac{\pi}{2} \\ x & \mbox{ if } & x>\frac{\pi}{2}\end{array}\right.)
Is this in any way correct?
I'm not really sure if I am still over simplifying things. And I apologize if these are stupid questions, but I am extremely stressed at the moment and just cannot figure this out.
Again, thanks for the help.
Re: Integral of a multi-part function
Quote:
Originally Posted by
sugarmuffin
Attempt 3
I've ended up with this
Is this in any way correct?
Did you account for the fact dt}=2~? )
Re: Integral of a multi-part function
Quote:
Originally Posted by
Plato
Did you account for the fact
dt}=2~? )
No.. I don't think I did. I have to admit that that completely stumps me, how does that come about?
Re: Integral of a multi-part function
Quote:
Originally Posted by
sugarmuffin
No.. I don't think I did. I have to admit that that completely stumps me, how does that come about?
If
then =S(-\pi)+\int_{-\pi}^{ x } {f(t)dt}=2+\int_{-\pi}^{ x } {(-\pi-t)dt})
Re: Integral of a multi-part function
Ahhh okay, I see what you mean now. But in the original post,  = -t - \pi \mbox{ if } t < -\pi)
So is
really a part of this interval? Can I still use it in the way you have suggested?
I just assumed it would be part of the sin(t) interval, and could only be used there.
Re: Integral of a multi-part function
Quote:
Originally Posted by
sugarmuffin
Ahhh okay, I see what you mean now.
But in the original post,  = -t - \pi \mbox{ if } t < -\pi)
So is

really a part of this interval? Can I still use it in the way you have suggested?
I just assumed it would be part of the sin(t) interval, and could only be used there.
In integrals that makes absolutely no difference.
The value is the same no matter one point.
If
then
.
Just do straightforward integration. Change no limits around.
If
then =S\left( {\tfrac{\pi }{2}} \right) + \int_{\frac{\pi }{2}}^x {1 dt} )
Re: Integral of a multi-part function
Okay, this has begun making sense. You sir, are a saint.
It would make sense to first do the middle one:
.
Then as you said before
 dt = S(-\pi) + \int_{-\pi} ^x f(t) dt)
![= 2 - \frac{1}{2}\left[t^2\right]_{-\pi} ^x - \left[\pi t\right]_{-\pi}^x =\underline{2 -\frac{1}{2}x^2-\pi x - \frac{\pi^2}{2}}](http://latex.codecogs.com/png.latex?= 2 - \frac{1}{2}\left[t^2\right]_{-\pi} ^x - \left[\pi t\right]_{-\pi}^x =\underline{2 -\frac{1}{2}x^2-\pi x - \frac{\pi^2}{2}})
And then finally with the same logic as before
![\mbox{If } \ x\ge\tfrac{\pi}{2} \ \mbox{ then } S(x)=S\left( {\tfrac{\pi }{2}} \right) + \int_{\frac{\pi }{2}}^x {1 dt} = (1-\cos{\frac{\pi}{2}}) +\left[ t\right]_{\frac{\pi}{2}} ^x =\underline{1 + (x - \frac{\pi}{2})}](http://latex.codecogs.com/png.latex?\mbox{If } \ x\ge\tfrac{\pi}{2} \ \mbox{ then } S(x)=S\left( {\tfrac{\pi }{2}} \right) + \int_{\frac{\pi }{2}}^x {1 dt} = (1-\cos{\frac{\pi}{2}}) +\left[ t\right]_{\frac{\pi}{2}} ^x =\underline{1 + (x - \frac{\pi}{2})})
Does this look better?
Re: Integral of a multi-part function
Quote:
Originally Posted by
sugarmuffin
Does this look better?
Yes, much better.
Re: Integral of a multi-part function
I've gone through it a couple of times now. Think I understand what we did fairly well.
Thanks again for your help. Really appreciated.