Results 1 to 14 of 14

Math Help - Integral of a multi-part function

  1. #1
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Integral of a multi-part function

    I have two functions

    f(t)=\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.

    S(x)=\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
    \int \sqrt{t^2 + 2\pi t + \pi^2} dt = \int \sqrt{(x+\pi)^2}= \frac{1}{2}(t+\pi)^2 +C

    2.a
    \int \cos{\left(\frac{\pi}{2}-t\right)} dt=\int \sin{t} dt = -\cos{t} + C

    3.a
    \int 1 dt = t + C

    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)

    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.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    I have two functions
    f(t)=\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.

    S(x)=\int_0 ^x f(t) dt \ \ \ \ -\infty < x < \infty

    I need to write S(x) without the integral sign.
    This is an extremely messy problem. You are over simplifying it too.

    First, if t\le -\pi then f(t)=-(t+\pi).

    Second, if x\le -\pi then \int_0^x {f(t)dt}  = \int_0^{ - \pi } {f(t)dt}  + \int_{ - \pi }^x{f(t)dt}

    So you should graph each part of the function to see what is going on.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Re: Integral of a multi-part function

    Thanks for replying!

    This is an extremely messy problem. You are over simplifying it too.
    Yeah, honestly it scares the hell out of me.

    So a different way to express f(t) could be like below?

    f(t)=\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.

    And if I continue from your example above

    \mbox{ if } x < -\pi \mbox{ then }\int_0 ^x f(t) 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

    Or am I still over simplifying things?

    I am not sure I understand how/why I divide that last integral into two parts. Would the part for 2.a look like below?

    \mbox{ if } -\pi \leq t \leq \frac{\pi}{2} \mbox{ then } \int_0 ^x f(t) dt = \int_0 ^{-\pi} f(t) dt + \int_{-\pi} ^{\frac{\pi}{2}} f(t) dt + \int_{\frac{\pi}{2}} ^x f(t) dt

    Thanks for your time!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    So a different way to express f(t) could be like below?

    f(t)=\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.
    f(t)=\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.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Re: Integral of a multi-part function

    Right, I don't know how I missed that.
    Then

    \mbox{ if } x < -\pi \mbox{ then }\int_0 ^x f(t) 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

    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?

    \mbox{ if } -\pi \leq t \leq \frac{\pi}{2} \mbox{ then } \int_0 ^x f(t) dt = \int_0 ^{-\pi} f(t) dt + \int_{-\pi} ^{\frac{\pi}{2}} f(t) dt + \int_{\frac{\pi}{2}} ^x f(t) dt
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Re: Integral of a multi-part function

    Attempt 3

    I've ended up with this

    S(x)=\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.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    Attempt 3

    I've ended up with this

    S(x)=\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?
    Did you account for the fact \int_0^{ - \pi } {f(t)dt}=2~?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Re: Integral of a multi-part function

    Quote Originally Posted by Plato View Post
    Did you account for the fact \int_0^{ - \pi } {f(t)dt}=2~?
    No.. I don't think I did. I have to admit that that completely stumps me, how does that come about?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    No.. I don't think I did. I have to admit that that completely stumps me, how does that come about?
    If x\le -\pi then S(x)=S(-\pi)+\int_{-\pi}^{ x } {f(t)dt}=2+\int_{-\pi}^{ x } {(-\pi-t)dt}
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Nov 2011
    Posts
    8

    Re: Integral of a multi-part function

    Ahhh okay, I see what you mean now. But in the original post, f(t) = -t - \pi \mbox{ if } t < -\pi

    So is t = -\pi 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.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    Ahhh okay, I see what you mean now. But in the original post, \color{red}f(t) = -t - \pi \mbox{ if } t < -\pi
    So is t = -\pi 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 -pi\le x \le\tfrac{\pi}{2} then S(x)=\int_{ 0}^x {\sin(t)dt} .
    Just do straightforward integration. Change no limits around.


    If x\ge\tfrac{\pi}{2} then S(x)=S\left( {\tfrac{\pi }{2}} \right) + \int_{\frac{\pi }{2}}^x {1 dt}
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Nov 2011
    Posts
    8

    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:

    \mbox{ If } \ -\pi\le x \le\tfrac{\pi}{2} \ \mbox{ then } \ S(x)=\int_{ 0}^x {\sin(t)dt}=\underline{1-\cos{x}}.

    Then as you said before

    \mbox{ If } \ x \leq -\pi \ \mbox{ then } \ \int_0 ^x f(t) 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}}

    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})}

    Does this look better?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,959
    Thanks
    1783
    Awards
    1

    Re: Integral of a multi-part function

    Quote Originally Posted by sugarmuffin View Post
    Does this look better?
    Yes, much better.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Nov 2011
    Posts
    8

    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.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Multi - Step Integral Problem
    Posted in the Calculus Forum
    Replies: 0
    Last Post: October 19th 2010, 07:58 PM
  2. multi-part polynomial question.
    Posted in the Algebra Forum
    Replies: 8
    Last Post: October 1st 2010, 02:21 PM
  3. octave and multi-criterion-function
    Posted in the Math Software Forum
    Replies: 3
    Last Post: April 22nd 2010, 05:13 AM
  4. Multi-part Gompertz growth problem
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: September 16th 2009, 12:25 AM
  5. Replies: 14
    Last Post: February 13th 2009, 05:27 AM

Search Tags


/mathhelpforum @mathhelpforum