NapkinCalc

Start Here — A Complete Tour

Solve by rearranging — solve()

continues from lesson 8 — values defined earlier in the course stay live here

Now the headline feature: NapkinCalc solves equations for you. solve(expression, variable) rearranges expression = 0 to isolate the variable — symbolically, by hand-quality algebra, not guessing. Here we recover Newton's a = F/m without doing the algebra ourselves.

Shortcut: in the app you rarely type solve by hand — open any equation cell's menu and pick "Solve for" the variable, and the cell is written for you.

forcenet:=10Nforce_{net} := 10 N = 10 N
massbox:=2kgmass_{box} := 2 kg = 2 kg
accel=solve(forcenetmassboxa,a)accel = \mathrm{solve}\left(force_{net} - mass_{box} \cdot a, a\right) = 5 N / kg isolate a from F − m·a = 0
✓ pass abs(accelforcenetmassbox1)<109\mathrm{abs}\left(\frac{accel}{\frac{force_{net}}{mass_{box}}} - 1\right) < 10^{-9} the engine returned F/m, exactly

When an equation has several answers, solve returns all of them as a list — for example the two roots of a quadratic:

quadroots=solve(x25x+6,x)quad_{roots} = \mathrm{solve}\left(x^{2} - 5 \cdot x + 6, x\right) = [2,3][2, 3] both roots at once
✓ pass max(quadroots)==3andmin(quadroots)==2max(quad_{roots}) == 3 and min(quad_{roots}) == 2 x = 2 and x = 3