Slope Fields and Solutions
Author: Dave Matthews

This little applet will show the slope fields for functions, f(x), as well as attempting to find a closed-form solution, using the indefinite integral.
Double-click the applet, to open the application, so that you can change the input functions.

To change the slope field, name the function (dy/dx = ):  f(x)

For example, in the input box, try f(x) = sin(2*x) - 3*cos(x/2)

Then, slide the blue dot around to represent the initial condition (or right click and "redefine" to be more accurate in your placement.)

Finally, slide the "Const " slider up or down until the curve passes through the dot.  The solution will appear as h(x) in the lower box.

G = (-2.479669421487603, 1.02198347107438)
f(x) = 2.0 * x + 1.0
Const = -2.1 (slider from -5 to 5, step 0.02)
g = Integral(f(x))
N = Sequence(Sequence[(i, j), i, -5.0, 5.0, 0.5], j, -5.0, 5.0, 0.5)
A = (0, 0)
A' = Rotate(A, atan(f(A * (1.0, 0.0))))
B = Rotate(A + (0.5, 0.0), atan(f(x(A))))
a = Segment(A, B)
R = Sequence(Sequence[Segment[Rotate[Element[Element[N, i], j], atan(f(x(Element[Element[N, i], j]))), Element[Element[N, i], j]], Rotate[Element[Element[N, i], j] + (0.3, 0.0), atan(f(x(Element[Element[N, i], j]))), Element[Element[N, i], j]]], j, 1.0, Length[Element[N, i]]], i, 1.0, Length[N])
h(x) = g(x) + Const
E = (4.522, -4.72)
F = (4.522, -3.2)
C = (-3.978, -3.29)
D = (-3.978, -4.76)
H = (-6.087669421487602, 5.4219834710743795)
I = (-2.677669421487603, 5.377983471074379)
J = (-2.6996694214876027, 3.5959834710743794)
K = (-6.175669421487602, 3.5739834710743796)
T1: "h(x) = " + h
T2: "h'(x) = " + f + "
   h( " + (x(G)) + " ) = " + (y(G))