Electric Circuits·charge-from-current-integration
Charge From Current Integration
Given a time-dependent current function i(t), compute the total charge accumulated by integrating the current from time zero to infinity. Current is the time derivative of charge, so charge is recovered by integrating current over time.
✓ 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 | {"amplitude":20,"decay_rate":5000} | 0.004 | 0.004 | ✓ |
| 2 | {"amplitude":10,"decay_rate":1000} | 0.01 | 0.01 | ✓ |
APIDeveloper APICall this calculator from codeexpand ↓
Endpoint
POST
/api/calculators/electric-circuits/charge-from-current-integration/computeInputs (2)
amplitudenumberdefault20decay_ratenumberdefault5000
Example
curl -sX POST http://localhost:3001/api/calculators/electric-circuits/charge-from-current-integration/compute \
-H "Content-Type: application/json" \
-d '{"inputs":{"amplitude":20,"decay_rate":5000}}'Try it live
Edit the body below, then click Call API.Request body
Response
(click Call API to see the response)Source: Pattern from: James W. Nilsson, Susan A. Riedel - Electric Circuits 11e - Instructor’s Solution Manual-Pearson (2019).pdf. Reproduces a standard charge-from-current-integration computation; problem text paraphrased.
AI disclosure: Calculator code generated by anthropic/claude-haiku-4-5-20251001; verified by 2 test cases.