Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Area@ImplicitRegion[x + y^2 >= 0 && x + 3 y^2 - 2 <= 0, {x, y}]
  2. (* 8/3 *)
  3.  
  4. rgn = DiscretizeRegion@ImplicitRegion[x + y^2 >= 0 && x + 3 y^2 - 2 <= 0, {x, y}];
  5. Area[rgn]
  6. (* 2.66664 *)
  7.  
  8. eqs = {x + 3 y^2 - 2 == 0, x + y^2 == 0};
  9. xs = First@Solve[#, x] & /@ eqs;
  10. pts = Solve[Reverse@eqs, {x, y}];
  11. NIntegrate[Subtract @@ (x /. xs), Evaluate@{y, Sequence @@ (y /. pts)}]
  12. (* 2.66667 *)
  13.  
  14. x == -y^2
  15. x == -3 y^2 + 2
  16.  
  17. Solve[-y^2 == -3 y^2 + 2, y]
  18. (* {{y -> -1}, {y -> 1}} *)
  19.  
  20. Plot[{-y^2, -3 y^2 + 2}, {y, -1, 1}, Frame -> True, Axes -> None,
  21. Filling -> {2 -> {1}}]
  22.  
  23. Integrate[-3 y^2 + 2 - (-y^2), {y, -1, 1}]
  24. (* 8/3 *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement