Message Boards Message Boards

2 Replies
3 Total Likes
View groups...
Share this post:

Area bounded by three lines

Posted 10 years ago

optimization, area of function

I have 3 linear functions that I'd like to find area for, where x is 700.
It's about price optimization.
I would like to find the area of the 3 functions where x = 700

Can mathematica count on areas?
And is there anyone who can help me with this.

Here is the plot:
Plot [{-x + 1030, 400 - 0.1 x, -0.5 x + 1030} , {x, 0, 1600}]

POSTED BY: Edorua Roam
2 Replies
Another way is to use three Solve functions for find the intersection points of the set of lines. Then use cross product to pin down the area. 
sol1=Solve[-x + 1030 == 400 - 0.1 x, x] (* x = 700*)
... (for other two lines)
Then extract the points with Replace + Rule combo.
point1 = {x,-x+1030 }/.sol1
Then you should be able to compute the vectors of two sides
Finally, use cross product to find the result: 
(1/2*Cross[point2-point1, point3-point1])[[3]]
POSTED BY: Shenghui Yang
I'm not clear on area at a point. For example, to find the area within the space enclosed by the three lines, I would do the following, since we already know the solution where the three lines meet ( x = 700 ). 
Integrate[ -x+1030,{x,0,1500}]-(
Integrate[ 400-0.1x,{x,0,700}]-Integrate[ -0.5x+1030,{x,700,1500}])
POSTED BY: Isaac Abraham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract