I know some method for estimation of $\pi$ .We can use Monte Carlo method to estimate $\pi $.We can use series to estimate $\pi $.
And my question is : Is there exist a (1 st order) differential equation or stochastic differential equation that can estimate $\pi $ ? or $\pi $ is a part of the solution, When we are implementing numerical iteration the solution close to $\pi $ ?
I tried some Matlab codes for Monte Carlo method like this below:
clear;
N=100000; % the experiment event number
r=1; %the circle radius
n=0; % sucessful event number
for i=1:N
x=-r+2*r*rand();
y=-r+2*r*rand();
if ((x^2+y^2)<=r^2)
n = n+1;
end
end
pi_sim=4*n/N
How can I make a relation between $\pi$ and diff. equations ? Thanks in advanced for any hint.
$$\textit{Specially, I am looking for Stochastic diff. Eq.}$$ Remark:
For example:If we solve this SDE $dx_t=(\mu-x_t)dt+\alpha dw_t$ we will see $\mathbb{E}[x_t] \to \mu $ so $$dx_t=(\pi-x_t)dt+\alpha dw_t \to (\mathbb{E}[x_t] \to \pi) $$ but this Non-interesting example (I made it by self)
As you know, any probability distribution sums up to zero. So, you can invoke gaussian distribution, where,
$\int_{x=-\infty}^{x=\infty} \frac{1}{\sqrt{2\pi}}e^{\frac{-x^2}{2}} dx = 1$
To obtain $\pi$. You need to use estimated e though, if you want to calculate it numerically.