Category Archives: Question and Answer

Can I calculate the product over the primes efficiently and with high precision?

I want to calculate the following product : $$prod_{p prime , ple 10^{10}} 1-frac{1}{p}$$ I know the approximation formula $$frac{e^{-gamma}}{ln(10^{10})}$$ where $gamma$ is the Euler-Mascheroni-constant. The result should be good to $12$ decimal digits. Is there an efficient way (not brute force by determining all primes, which takes long with PARI/GP) to calculate this product… Read More »

How can I plot this nonlinear system using MATLAB

I am trying to plot this servomechanism system in MATLAB. The system is shown in figure. $V$(voltage) is input of the system and $theta_L$ is output of the system. How can I plot $V(t)$ and $theta_L(t)$ ? Equations of the system is shown below. $$dot{omega}_L=-512θ_L-25θ_M-10omega_L$$ $$dot{omega}_M=V-10omega_M-128θ_L-6θ_M $$ $$$$ So, $$ theta_L”=-512theta_L+25theta_M-10theta_L’ $$ $$theta”_M=V-10theta’_M+128theta_L-6theta_M $$ So… Read More »