Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am working on a project that uses numerical integration to solve some differential equations. Not coming from a solid math background, I have a problem understanding some integration methods. Specifically, I have the following equation:

$$ \frac{d y}{d t} = \frac{u - y}{v} \,, $$ where $u$ and $v$ are constants and $y(0)$ is known.

I solved this initially with a simple Euler integration and then with some other higher-order methods (Runge-Kutta 4). Then, I found another numerical integrator that did: $$ y_{n+1} = y_{n} + (u - y_{n})(1 - e^{\frac{-\Delta t}{v}}) \,. $$

My question is: what is this integration method? I checked and the results are basically the same, but I had no idea about this technique and I would like to know more about it.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Its just the analytical answer to your equation.

$y(t) = c_1 e^{-\frac{t}{v}}+u$, with an initial condition $y(0) = c_1 + u = y_0$ which gives you $y(t) = (y_0-u) e^{-\frac t v}+u = y_0 + (u-y_0)(1-e^{-\frac t v})$

Just call $y_{n+1} = y(t)$ and $y_n = y_0$ with $\Delta t = t$ and you obtain your equation. This is not a general numerical method which applies to other differential equations.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.