I am trying to solve a differentiation/integration. I know the following relationship that indicates the rate of change of $x$ with time.
$\dfrac{dx}{dt} = H\dfrac{dy}{dt} - kx$, where $H$ and $k$ are constants.
The value for $y\in(y_1, y_2,...)$ can be known at each time step. I am now trying to find the value of $x$ at each time step but I am not able to. Your kind feedback would be really helpful. :)
Regards, venkatesh
By letting $\;\varphi(t)=H\dfrac{\mathrm dy}{\mathrm dt}\,,\,$ the differential equation turns into:
$\dfrac{\mathrm dx}{\mathrm dt}+kx=\varphi(t)\;.$
The general solution of the homogeneous differential equation
$\dfrac{\mathrm dx}{\mathrm dt}+kx=0\quad$ is $\quad\;\;x(t)=Ae^{-kt}\;,\;\;$ where $\;A\in\Bbb R\;.$
Let $\displaystyle\;B(t)=\int_0^t\!\varphi(u)e^{ku}\mathrm du\;.$
The general solution of the differential equation
$\dfrac{\mathrm dx}{\mathrm dt}+kx=\varphi(t)\quad$ is
$x(t)=Ae^{-kt}+B(t)e^{-kt}\;.$