Método de Euler-Maruyama

Origem: Wikipédia, a enciclopédia livre.

O Método de Euler-Maruyama é uma esquema numérico desenvolvido para resolver equações diferenciais estocásticas. O nome homenageia os matemáticos Euler e Maruyama, de duas gerações completamente diferentes. O método é somente uma extensão do método de Euler, sendo assim o nome.[1]

Exemplo: crescimento populacional estocásticos[editar | editar código-fonte]

Considere a equação diferencial estocásticas:[1]

Abaixo segue o código em Matlab para resolvê-la, e logo abaixo segue algumas simulações ao lado da solução determinística.

function EulerMaruyama
%This function applies the method of Euler-Maruyama for solving the
%stochastic differential equation: dX(t)= rX(t)(1-X(t)/K)dt +
%sigmaX(t)(1-X(t)/K)dW(t)

r=0.8;%growth rate
K=100;%Carrying capacity
sigma=0.9;%stochasticity coefficient 
T=15;%time for simulation
N=400;%number of steps in the grid
dt=T/N;%small intervals of time
x0=10;%initial condition

X=x0;%state vector
Xvector=x0;%list of state vectors

for t=1:N
   %this loop shall repeat until we achieve the end of the simulation
    X=X + r*X*(1 - X/K)*dt + sigma*X*(1- X/K)*sqrt(dt)*randn;% the SDE
    Xvector=[Xvector,X];%save current simulation
    
end

mean=x0;
meanlist=x0;

for t=1:N
    %here is just the Euler method: x(t+dt)= x(t) + dt*f(x,t)
    % for solving dx/dt=f(x,t)
    mean=mean + r*mean*(1 - mean/K)*dt;
    meanlist=[meanlist, mean];

end

time=0:dt:T;
plot(time, Xvector, time, meanlist)
hold on

ylim([0,130]);


end

A saída do código segue abaixo

Um exemplo de como aplicar o método de Euler-Maruyama a uma equação diferencial estocástica

Ver também[editar | editar código-fonte]

Referências

  1. a b Logan, J. David and Wolesensky, Willian R. Mathematical methods in biology. Pure and Applied Mathematics: a Wiley-interscience Series of Texts, Monographs, and Tracts. John Wiley& Sons, Inc. 2009.