Calculus/Cal 2·area-between-curves
Area Between Curves
Determine the area enclosed between two specified curves over a defined interval.
Math animationCalculus/Cal 2 · area-between-curves
✓ All 2 test cases pass.
Inputs
Test cases
These cases run live in your browser every time the page loads. If any fail, the calculator is broken — file an issue.
| # | Inputs | Expected | Got | Status |
|---|---|---|---|---|
| 1 | {"upper_curve":"5*x - x^2","lower_curve":"x","interval_start":0,"interval_end":5} | 8.33333 | 8.333333333333332 | ✓ |
| 2 | {"upper_curve":"x^2","lower_curve":"0","interval_start":0,"interval_end":2} | 2.66667 | 2.666666666666665 | ✓ |
APIDeveloper APICall this calculator from codeexpand ↓
Endpoint
POST
/api/calculators/calculus-cal-2/area-between-curves/computeInputs (4)
upper_curveexpressiondefault"5*x - x^2"lower_curveexpressiondefault"x"interval_startnumberdefault0interval_endnumberdefault5
Example
curl -sX POST http://localhost:3001/api/calculators/calculus-cal-2/area-between-curves/compute \
-H "Content-Type: application/json" \
-d '{"inputs":{"upper_curve":"5*x - x^2","lower_curve":"x","interval_start":0,"interval_end":5}}'Try it live
Edit the body below, then click Call API.Request body
Response
(click Call API to see the response)Source: Pattern from: Calculus II Final Exam Review.pdf. Reproduces a standard area-between-curves computation; problem text paraphrased.
AI disclosure: Calculator code generated by openai/gpt-4o-mini-2024-07-18; verified by 2 test cases.