The difference eqn or diffrential eqn is an equation which descripe the input output relation of a system
The difference eqn is used for discreat system
The diffrential eauation used in continuous system
Examples
1-Differnce equation:
assume a system with output x and input y and the difference eqn descrping this system is
x[n]=y[n]-x[n-1] initial condition x[-1]=0
and the input is y[n]= n for n=0,1,2,3,...
find x[n]
solution:
This diffence equation can be solved by alot of methods the simple method is the direct method but it doesn't give any compact form
x[0]=y[0]-x[-1]=0-0=0
x[1]=y[1]-x[0]=1-0=1
x[2]=y[2]-x[1]=2-1=1
.
.
You also can use the Z-transform to get an compact form for x
2- Diffrential equation
Is like the diffrence equation but in continuous system and have a lot of methods to solve
the famous method is Laplace transform
Example
ydy+x=dx
For more information see this links :
https://en.wikipedia.org/wiki/Difference_equation
https://en.wikipedia.org/wiki/Differential_equation