0
$\begingroup$

Please, Help to find the area between two curves.

ContourPlot[{x + y^2 == 0, x + 3 y^2 - 2 == 0}, {x, -2, 2}, {y, -2, 2}]
$\endgroup$
2
  • 1
    $\begingroup$ Welcome to Mathematica! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Oct 6 '15 at 16:48
  • $\begingroup$ You need to know how to integrate ... $\endgroup$ – Dr. belisarius Oct 6 '15 at 16:49
5
$\begingroup$
Area@ImplicitRegion[x + y^2 >= 0 && x + 3 y^2 - 2 <= 0, {x, y}]
(* 8/3 *)

or

rgn = DiscretizeRegion@ImplicitRegion[x + y^2 >= 0 && x + 3 y^2 - 2 <= 0, {x, y}];
Area[rgn]
(* 2.66664 *)

or

eqs = {x + 3 y^2 - 2 == 0, x + y^2 == 0};
xs = First@Solve[#, x] & /@ eqs;
pts = Solve[Reverse@eqs, {x, y}];
NIntegrate[Subtract @@ (x /. xs), Evaluate@{y, Sequence @@ (y /. pts)}]
(* 2.66667 *)

or do it by hand.

$\endgroup$
1
  • $\begingroup$ Thank you very much! Its really good. $\endgroup$ – Bed Dhakal Oct 7 '15 at 1:42
3
$\begingroup$

The area you are looking for is enclosed by the curves

x == -y^2
x == -3 y^2 + 2

They intersect here:

Solve[-y^2 == -3 y^2 + 2, y]
(* {{y -> -1}, {y -> 1}} *)

Plotting the area of interest:

Plot[{-y^2, -3 y^2 + 2}, {y, -1, 1}, Frame -> True, Axes -> None, 
 Filling -> {2 -> {1}}]

Mathematica graphics

As you can see the area between the curves is simply the difference between areas under each individual curves:

Integrate[-3 y^2 + 2 - (-y^2), {y, -1, 1}]
(* 8/3 *)
$\endgroup$
1
  • $\begingroup$ Thank you very much! It really worked for me. $\endgroup$ – Bed Dhakal Oct 7 '15 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.