# Finding Exact Value of a Region enclosed by 2 curves

Given Question:

Consider the functions f(x)=ax2-x+1 and g(x)=-x2+10x+3. For each a>0, let R(a) be the area enclosed by the curves y=f(x) and y=g(x). Find the unique value a>0 such that R(a)= 1257728/3213675. I have to put into exact value.

From my understanding: I can see it's going to be some two quadratic equations and it gives an enclosed region, which has already given the region area of 1257728/3213675. However, I'm having trouble finding the unique value for "a"

What I so far did

 f = a*x^2 - x + 1;
g = -x^2 + 10 x + 3;
Plot[{f, g}, {x, -5, 10}, PlotLegends -> "Expressions"]


but it doesn't plot anything since a is unknown. Maybe some iteration is required but I'm not familiar with it.

Here's one way to do it:

First, find the intersection points of the two parabolas, since those will be our limits of integration later:

left = x /. First @ Solve[{(-x^2 + 10 x + 3) - (a x^2 - x + 1) == 0,
x < 0, a > 0}, x] // Simplify[#, a > 0] &
(11 - Sqrt[129 + 8 a])/(2 + 2 a)

right = x /. First @ Solve[{(-x^2 + 10 x + 3) - (a x^2 - x + 1) == 0,
x > 0, a > 0}, x] // Simplify[#, a > 0] &
(11 + Sqrt[129 + 8 a])/(2 + 2 a)


(Note how I imposed constraints in Solve[] to get the solution I want.)

From here, we set up the integral expression for the area:

area = Assuming[a > 0,
Simplify[Integrate[(-x^2 + 10 x + 3) - (a x^2 - x + 1),
{x, left, right}]]]
(129 + 8 a)^(3/2)/(6 (1 + a)^2)


(note again the imposition of the constraint)

Finally, we use Solve[] again to get the required value of a:

a /. First @ Solve[{area == 1257728/3213675, a > 0}, a]
1027/8


To check: use this value of a to get the corresponding integration limits:

{left, right} /. a -> 1027/8
{-4/45, 4/23}


Plot the region:

Plot[{1027 x^2/8 - x + 1, -x^2 + 10 x + 3}, {x, -4/45, 4/23}]


Find the extremes:

{MinValue[1027 x^2/8 - x + 1, x], 1027 x^2/8 - x + 1 /. x -> 4/23}
{1025/1027, 2491/529}


and then use Area[] + ImplicitRegion[]:

Area[ImplicitRegion[1027 x^2/8 - x + 1 <= y <= -x^2 + 10 x + 3,
{{x, -4/45, 4/23}, {y, 1025/1027, 2491/529}}]]


which should yield the expected answer.