That equation does not reflect your original question dy/dx = 1.5x^2 -2x +3 . The difference is in the variable: N(t) makes it a function of time with a constant value (1.5x^2 -2x +3 is constant in t), whereas dy/dx = 1.5x^2 -2x +3 has the output depending on the input x.
You need a couple of values:
- a vector of Y values indexed by iteration number. This is not exactly the same as the y of dy/dx because the y of dy/dx is a function and y(K) would mathematically indicate y applied to K rather than y indexed at K
- a vector of X values indexed by iteration number. Again, not exactly the same as the x of dy/dx for the same reason
- A current iteration number to index into the arrays
- an initial x value
- a final x value
At any one iteration after the first, increase the "current" X value by a constant (your h). Calculate dy/dx at that current X value. Use that result and the previous "current" Y value, and the timestep, to interpolate the new "current" Y value. The interpolation formula to use depends upon whether you are using ODE 4/5 or ODE 2/3 or other interpolation method.
If you compare this to what you have, you are missing the calculation of the current dy/dx.
The exponential formula you calculate might be useful for some kind of comparison, but is otherwise unrelated to the problem.
When you get around to estimating the polynomial, what you should get is the integral of 1.5x^2 -2x +3 -- that is, 1/2 * x^3 - x^2 + 3*x + c for some constant c.