My Math Forum Setting up integral

 Calculus Calculus Math Forum

September 30th, 2016, 12:20 PM   #1
Newbie

Joined: Sep 2016

Posts: 6
Thanks: 0

Setting up integral

I'm trying to calculate the area between two parallel linear lines

f1=4-x
f2=5-x

Integrating between x= 0-5

But I only want the area between y=0 and y=5 (as constraints) all in the first quadrant.

Now these are easy equations to integrate but the biggest issue I am having is setting up the integral... I've done something like this:

[F(5) - F(f2)]dx - [F(5)-F(f1)]dx where definite integral range is 0-5

But I end up getting a negative value which makes no sense. The only thing I can conclude is the way I am setting up my integral which is incorrect. Anyone know how I can setup this integral given where I want my area?
Attached Images
 function.jpg (11.3 KB, 0 views)

 September 30th, 2016, 01:17 PM #2 Senior Member     Joined: Sep 2015 From: Southern California, USA Posts: 1,607 Thanks: 819 I would set this up as $\displaystyle{\int_0^5}f_2(x) - f_1(x)~dx$ $\displaystyle{\int_0^5}(5-x) - (4-x)~dx$ Basically you find the area under $f_2$ and subtract off the area under $f_1$ leaving the part you are interested in. $\displaystyle{\int_0^5}(5-x) - (4-x)~dx =$ $\displaystyle{\int_0^5}1~dx = 5$ btw your pic is a bit off. $f_1(0)=4,~f_2(0)=5$ Thanks from ihaque
September 30th, 2016, 01:25 PM   #3
Newbie

Joined: Sep 2016

Posts: 6
Thanks: 0

Quote:
 Originally Posted by romsek I would set this up as $\displaystyle{\int_0^5}f_2(x) - f_1(x)~dx$ $\displaystyle{\int_0^5}(5-x) - (4-x)~dx$ Basically you find the area under $f_2$ and subtract off the area under $f_1$ leaving the part you are interested in. $\displaystyle{\int_0^5}(5-x) - (4-x)~dx =$ $\displaystyle{\int_0^5}1~dx = 5$ btw your pic is a bit off. $f_1(0)=4,~f_2(0)=5$
Thanks for the reply but I'd like to constrain the area between y=0 to y=5 and from x=0 to x=5 but wouldn't the above solution not consider the constraint from y=0 to y=5?

*Sorry I should expand on the above... My f1 and f2 functions are very general and I'm working thru this on excel where f1 and f2 will change depending on m and b values input. But based on the m and b values, I'd like to constrain that area within a box of 5x5 if that makes sense?

Last edited by ihaque; September 30th, 2016 at 01:28 PM.

September 30th, 2016, 01:32 PM   #4
Senior Member

Joined: Sep 2015
From: Southern California, USA

Posts: 1,607
Thanks: 819

Quote:
 Originally Posted by ihaque Thanks for the reply but I'd like to constrain the area between y=0 to y=5 and from x=0 to x=5 but wouldn't the above solution not consider the constraint from y=0 to y=5? *Sorry I should expand on the above... My f1 and f2 functions are very general and I'm working thru this on excel where f1 and f2 will change depending on m and b values input. But based on the m and b values, I'd like to constrain that area within a box of 5x5 if that makes sense?
Yes you're correct. My bad. The integral should be

$\displaystyle{\int_0^4}f_2-f_1~dx+\displaystyle{\int_4^5}f_2~dx = \dfrac 9 2$

September 30th, 2016, 01:45 PM   #5
Newbie

Joined: Sep 2016

Posts: 6
Thanks: 0

Quote:
 Originally Posted by romsek Yes you're correct. My bad. The integral should be $\displaystyle{\int_0^4}f_2-f_1~dx+\displaystyle{\int_4^5}f_2~dx = \dfrac 9 2$
Okay, for this example it would make sense, but hear me out:

Assume f1 as a linear function similar to above.

Assume f2 as a linear function similar to above.

And now let's add f3, which is equal to f3=5

If I want the definite integral from 0-5 in the first quadrant only given the above functions, is it fair to write it as the following:

(F2-F1)-(F2-F3)?

Last edited by skipjack; October 12th, 2016 at 12:47 PM.

September 30th, 2016, 02:01 PM   #6
Senior Member

Joined: Sep 2015
From: Southern California, USA

Posts: 1,607
Thanks: 819

Quote:
 Originally Posted by ihaque Okay, for this example it would make sense, but hear me out: Assume f1 as a linear function similar to above. Assume f2 as a linear function similar to above. And now let's add f3, which is equal to f3=5 If I want the definite integral from 0-5 in the first quadrant only given the above functions, is it fair to write it as the following: (F2-F1)-(F2-F3)?
If you run this through you get $\dfrac {35}{2}$ which isn't the correct answer.

If I understand what you're trying to do, you want to find a way to express that triangular area of the integral of $f1$ that is below the x-axis, so you can subtract it off the simple integral of $f2-f1$

I don't see any really clever way of doing that that isn't equivalent to what I did treating the range $x \in (4,5]$ separately.

Last edited by skipjack; October 12th, 2016 at 12:48 PM.

 September 30th, 2016, 05:55 PM #7 Global Moderator   Joined: May 2007 Posts: 6,380 Thanks: 542 For x < 4, the integrand is f2-f1. For 4 < x < 5, the integrand is f2.
 October 12th, 2016, 12:40 PM #8 Global Moderator   Joined: Dec 2006 Posts: 18,166 Thanks: 1424 $\displaystyle \int_0^5\!f_2\,dx - \int_0^4\!f_1\,dx = \frac{25}{2} - 8 = \frac92$

 Tags integral, setting

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post ihaque Calculus 2 October 12th, 2016 12:52 PM swm06 Algebra 4 January 20th, 2013 03:14 PM lkl Linear Algebra 4 January 29th, 2012 02:25 PM offy Calculus 3 October 14th, 2010 06:55 AM asdf122345 Calculus 7 June 15th, 2010 06:40 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top