SCREEN 12 VIEW (90, 50)-(638, 328), 8, 4 WINDOW (-.5, 0)-(10.5, 40) PRINT "Now the exact solution is calculated, at the computed points, that is." PRINT "The points are accurate even for a large steplength: try .001 and 4." x0 = 0: u = 10 'Note that h has become x PRINT "Initial level ="; x0; "Input U ="; u: PRINT LINE (0, 0)-(10, 0), 9 'Draw axis, blue k = .5 DO INPUT "Step "; dt: IF dt = 0 THEN END g = EXP(-k * dt) 'Coefficients for exact solution h = (1 - g) / k x = x0 'Initial values to x and t t = 0 PSET (0, x0) 'Move to starting point DO x = g * x + h * u 'This is the simulation t = t + dt LINE -(t, x) 'This displays the result as lines 'which join the computed points LOOP UNTIL t > 10 LOOP