Solve a differential eqn

Thread Starter


Joined Oct 28, 2011
I need to design a ckt for the following matlab code....The code tries to numerically solve the equation

y'' + 3xy' + 3y = 0

Here, u is assumed to represent dy/dx or y'. dx is approximated as x1 - x. Similarly, dy = y1 - y and du = u1 - u. The value 'a' provides the number of times the numerical loop is executed. u1, x1 and y1 represent the new values of u, x and y. Thus, x1 = x + dx, y1 = udx + y, u1 = u - 3xudx - 3ydx. The ckt executes by loading the initial values of x, y, u, dx, and a.


clear all;
close all;
x=input('enter x');
y=input('enter y');
u=input('enter u');
dx=input('enter dx');
a=input('enter numerical iterations');
while x < a,

y = y + u*dx;
x = x + dx;



Specifications to be me :t
1> The maximum size of inputs should be integers of size 32 bits
2> use of clock signal should be avoided if possible

Help required:
1>when i design the circuit, i am unable to sequence the events to occur one after the other. Kindly advice.
2>Too many registers and flip-flops are used... I need to optimize them.. If anybody could post the general logic diagram even that would be fine.

Thnxs in advance


Joined Sep 7, 2009
y'' + 3xy' + 3y = 0

I recognize the equation's form as nonlinear differential equation. When I was in school, we solved it using an analog computer. It would iterate numerical values and zero in on a convergence point. I have no idea how to do it digitally if it is possible.


Joined Feb 24, 2006
You solve it digitally by writing expressions for the derivatives and folowing the computations to develop the solution, Collecting the data for a phase plane plot is a good way to do it. With pencil and paper the method of isoclines may be of interest to you.