← All posts
Education

Build an AI Tutor App: Math & Physics Solver API for $0.01/Problem

Aaddyy Team
import { AADDYY } from 'aaddyy'
const client = new AADDYY()

const solution = await client.math.solve({
  problemText: 'Find the integral of x^2 from 0 to 5',
  explanationLevel: 'step-by-step'
})

console.log(solution.solution.finalAnswer)
// "x³/3 evaluated from 0 to 5 = 125/3 ≈ 41.67"

One credit. One cent. A complete step-by-step solution with formulas, verification, and common mistakes to avoid.

If you're building a homework helper, tutoring platform, or educational app — this is the API you've been looking for.

The Problem

Wolfram Alpha API costs $25/month. Building your own math solver means prompt engineering, LaTeX handling, and edge cases for every math domain. Most "math AI" apps (MathGPT, Photomath) are consumer apps — they don't offer developer APIs.

AADDYY's Math Solver and Physics Solver are REST APIs designed for developers. Send a problem, get a structured response.

Math Solver

const solution = await client.math.solve({
  problemText: 'Solve the quadratic equation: 2x^2 - 5x + 3 = 0',
  explanationLevel: 'step-by-step',
  problemCategory: 'algebra'
})

Response structure:

{
  "problemType": "quadratic equation",
  "difficulty": "medium",
  "solution": {
    "steps": [
      { "stepNumber": 1, "title": "Identify coefficients", "formula": "a=2, b=-5, c=3" },
      { "stepNumber": 2, "title": "Apply quadratic formula", "formula": "x = (-b ± √(b²-4ac)) / 2a" },
      { "stepNumber": 3, "title": "Calculate discriminant", "calculation": "25 - 24 = 1" },
      { "stepNumber": 4, "title": "Solve", "calculation": "x = (5 ± 1) / 4" }
    ],
    "finalAnswer": "x = 3/2 or x = 1",
    "verification": "2(3/2)² - 5(3/2) + 3 = 0 ✓",
    "alternativeMethods": ["Factoring: (2x-3)(x-1) = 0"],
    "commonMistakes": ["Forgetting the ± in the quadratic formula"],
    "keyConceptsUsed": ["Quadratic formula", "Discriminant"]
  }
}

Supported categories: arithmetic, algebra, geometry, trigonometry, calculus, statistics, linear algebra — or auto-detect to let the AI figure it out.

Explanation levels: brief (just the answer), step-by-step (full walkthrough), conceptual (why it works).

Physics Solver

const solution = await client.physics.solve({
  problemText: 'A 2kg ball is thrown upward at 15 m/s. Find the maximum height and time to reach it.',
  explanationLevel: 'step-by-step',
  unitsPreference: 'SI'
})

Supported categories: mechanics, electricity & magnetism, thermodynamics, optics, waves, modern physics, fluid mechanics — or auto-detect.

Image Input

Both solvers accept photos of handwritten problems:

const solution = await client.math.solve({
  problemImage: 'base64_encoded_image_here',
  inputType: 'image',
  explanationLevel: 'step-by-step'
})

Take a photo of a textbook problem or handwritten equation, encode it as base64, and send it. The API reads the image and solves it.

Build a Tutor App in 30 Lines

import express from 'express'
import { AADDYY } from 'aaddyy'

const app = express()
const ai = new AADDYY()
app.use(express.json())

app.post('/api/solve/math', async (req, res) => {
  const result = await ai.math.solve({
    problemText: req.body.problem,
    explanationLevel: req.body.detailed ? 'step-by-step' : 'brief',
    problemCategory: 'auto-detect'
  })
  res.json(result)
})

app.post('/api/solve/physics', async (req, res) => {
  const result = await ai.physics.solve({
    problemText: req.body.problem,
    explanationLevel: 'step-by-step',
    unitsPreference: req.body.units || 'SI'
  })
  res.json(result)
})

app.listen(3000)

Your users submit problems, get instant step-by-step solutions. You pay $0.01 per problem.

Pricing Comparison

ServiceCostModel
Wolfram Alpha API$25/monthSubscription
OpenAI GPT-4 (DIY)~$0.03-0.10/problemToken-based + prompt engineering needed
MathGPTNo API availableConsumer app only
AADDYY Math Solver$0.01/problemPay-per-use, structured response
AADDYY Physics Solver$0.01/problemPay-per-use, structured response

Video Explainers Too

Want animated educational videos instead of text? AADDYY has that:

const clip = await client.videos.eduClip({
  topic: 'How integration works in calculus',
  duration: 30  // seconds
})
// Returns: { video: { url: "https://...", duration: 30 } }

~60 credits ($0.60) per clip. Perfect for visual learners.

Getting Started

npm install aaddyy
export AADDYY_API_KEY=aip_your_key_here

50 free credits = 50 math problems solved for free.

Explore AI tools on Aaddyy

Browse tools
Build an AI Tutor App: Math & Physics Solver API for $0.01/Problem | AADDYY | AADDYY Blog | AADDYY - AI Tools Marketplace