SICP Exercise 3.78 solve-2nd
Exercise 3.78.
Consider the problem of designing a signal-processing system to study the homogeneous second-order linear differential equation
The output stream, modeling y, is generated by a network that contains a loop. This is because the value of d2y/dt2depends upon the values of y and dy/dt and both of these are determined by integrating d2y/dt2. The diagram we would like to encode is shown in figure 3.35. Write a procedure solve-2nd that takes as arguments the constants a, b, and dtand the initial values y0 and dy0 for y and dy/dt and generates the stream of successive values of y.
SOLUTION
The code and tests are here.
The plots are pasted below and also available here.
SOLUTION
The code and tests are here.
The plots are pasted below and also available here.
Comments
Post a Comment