My Math Forum Euler method/ Euler formula

 Calculus Calculus Math Forum

 November 5th, 2011, 12:22 AM #1 Newbie   Joined: Nov 2011 Posts: 10 Thanks: 0 Euler method/ Euler formula Im really struggling with how to do this question, can anyone help me? Use the Euler method with step size h to approximate the solution to dP/dT=10p(1-p) where p(0)=0.1 Show that the corresponding Euler formula takes the form pn+1 = (1 + 10h)pn ? 10hp^2 n, p0 = 0.1 Implement pn+1 = (1 + 10h)pn ? 10hp^2 n, p0 = 0.1 as a computer program. Set h = 0.1. Plot the numerical and the analytical solution on a single graph and compare them. Ps the n and n+1 in the equations are to the base. thanks
 November 5th, 2011, 12:57 AM #2 Member   Joined: Jul 2009 Posts: 57 Thanks: 0 Re: Euler method/ Euler formula You have: $\frac{dP}{dT}= 10P(1-P)$ With Euler's formula taking the forum: $x_1 = x_0 + \Delta x y_1 = y_0 + y'\Delta x$ and having P = y, change x = h, and subscripts representing position, then: $P_{n+1} = P_n + 10P_n(1-P_n)h P_{n+1} = P_n + 10P_nh - 10P_n^2h P_{n+1} = P_n(1 + 10h) - 10P_n^2h$ At n = 0, you would have: $P_{0+1} = P_0(1 + 10h) - 10P_0^2h P_{1} = P_0(1 + 10h) - 10P_0^2h P_{1} = 0.1(1 + 10h) - 10*0.1^2h P_{1} = 0.1 + h - 0.1h P_{1} = 0.1 + 0.9h$ Which is consistent with: $y_1 = y_0 + y'\Delta x y_1 = 0.1 + 10*0.1(1-0.1)h y_1 = 0.1 + h - 0.1h y_1 = 0.1 + 0.9h$

 Tags euler, formula, method or

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post WRNWRN Calculus 0 December 9th, 2012 09:51 AM FalkirkMathFan Real Analysis 0 November 5th, 2011 12:24 AM FalkirkMathFan Real Analysis 0 November 4th, 2011 04:08 AM FalkirkMathFan Calculus 0 November 3rd, 2011 04:52 PM Singularity Calculus 1 February 27th, 2010 03:24 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top