My Math Forum Solve second order differential equation(Euler's method)

 Differential Equations Ordinary and Partial Differential Equations Math Forum

April 18th, 2011, 06:56 AM   #1
Newbie

Joined: Apr 2011

Posts: 2
Thanks: 0

Solve second order differential equation(Euler's method)

Please, help me with solve of this equation:
Attached Images
 Image 1.jpg (9.9 KB, 3231 views)

 April 18th, 2011, 06:29 PM #2 Senior Member   Joined: Apr 2007 Posts: 2,140 Thanks: 0 y"(1) = 2e
 April 18th, 2011, 11:05 PM #3 Senior Member     Joined: Jul 2010 From: St. Augustine, FL., U.S.A.'s oldest city Posts: 12,211 Thanks: 520 Math Focus: Calculus/ODEs Re: Solve second order differential equation(Euler's method) First, let's find the solution satisfying the given conditions, then we'll employ Euler's method for comparison. a) Find the solution to the corresponding homogeneous solution. The auxiliary equation is: $r^2-2r=0\:\therefore\:r=0,2$ thus: $y_h(x)=c_1+c_2e^{2x}$ b) Find a particular solution, we can assume it will be of the form: $y_p(x)=Ae^x=y_p'(x)=y_p'#39;(x)$ Substituting into the ODE gives: $Ae^x-2$$Ae^x$$=2e^x$ $-Ae^x=2e^x\:\therefore\:A=-2$ $y_p(x)=-2e^x$ Thus, the general solution is: $y(x)=y_h(x)+y_p(x)=c_1+c_2e^{2x}-2e^x$ $y'(x)=2c_2e^{2x}-2e^x$ Now, we use initial conditions to determine the parameters: (1) $-1=c_1+c_2e^2-2e$ (2)  Solving (2) for $c_2$ we find: $c_2=\frac{1}{e}$ Substituting into (1) we get: $c_1=e-1$ Thus, the solution satisfying the given conditions is: $y(x)=e-1+e^{2x-1}-2e^x$ $y(2)=e-1+e^{3}-2e^2=e^3-2e^2+e-1\approx7.025706553785$ To use Euler's method, we begin by converting the given IVP into an IVP for a system of first order equations. First, we express the ODE as: $y''=2y#39;+2e^x$ Setting: $u_1(x)\equiv y(x)$ $u_2(x)\equiv y'(x)$ we obtain: $u_1'(x)=u_2(x)$ $u_2'(x)=2u_2(x)+2e^x$ The initial conditions given transform to: $u_1(1)=-1$, $u_2(1)=0$ Recall, Euler's method is given recursively by: $x_{n+1}=x_n+h$ $y_{n+1}=y_n+hf$$x_n,y_n$$$ Extending this to the system of equations, we have: $x_{n+1}=x_n+h$ $u_{n+1,1}=u_{n,1}+hu_2$$x_n$$$ $u_{n+1,2}=u_{n,2}+2h$$u_{n,2}+e^{x_n}$$$ With h = 0.1, we have: $x_{n+1}=x_n+0.1$ $u_{n+1,1}=u_{n,1}+0.1u_{n,2}$ $u_{n+1,2}=1.2u_{n,2}+0.2e^{x_n}$ Step 0: $x_0=1$ $u_{0,1}=-1$ $u_{0,2}=0$ Step 1: $x_1=1.1$ $u_{1,1}=-1+0.1(0)=-1$ $u_{1,2}=1.2(0)+0.2e^{1}=0.5436563656918$ Step 2: $x_2=1.2$ $u_{2,1}=-1+0.1(0.543656365691=-0.94563436343082" /> $u_{2,2}=1.2(0.543656365691+0.2e^{1.1}=1.25322084 36194465" /> Step 3: $x_3=1.3$ $u_{3,1}=-0.94563436343082+0.1(1.2532208436194465)=-0.8203122790688753$ $u_{3,2}=1.2(1.2532208436194465)+0.2e^{1.2}=2.16788 83968906453$ Step 4: $x_4=1.4$ $u_{4,1}=-0.8203122790688753+0.1(2.1678883968906453)=-0.6035234393798108$ $u_{4,2}=1.2(2.1678883968906453)+0.2e^{1.3}=3.33532 5409792623$ Step 5: $x_5=1.5$ $u_{5,1}=-0.6035234393798108+0.1(3.335325409792623)=-0.26999089840054846$ $u_{5,2}=1.2(3.335325409792623)+0.2e^{1.4}=4.813430 485120082$ Step 6: $x_6=1.6$ $u_{6,1}=-0.26999089840054846+0.1(4.813430485120082)=0.21135 215011146$ $u_{6,2}=1.2(4.813430485120082)+0.2e^{1.5}=6.672454 3962117115$ Step 7: $x_7=1.7$ $u_{7,1}=0.21135215011146+0.1(6.6724543962117115)=0 .8785975897326312$ $u_{7,2}=1.2(6.6724543962117115)+0.2e^{1.6}=8.99755 1760333078$ Step 8: $x_8=1.8$ $u_{8,1}=0.8785975897326312+0.1(8.99755176033307= 1.778352765765939" /> $u_{8,2}=1.2(8.99755176033307+0.2e^{1.7}=11.89185 1590745134" /> Step 9: $x_9=1.9$ $u_{9,1}=1.778352765765939+0.1(11.891851590745134)= 2.9675379248404523$ $u_{9,2}=1.2(11.891851590745134)+0.2e^{1.8}=15.4801 51401776748$ Step 10: $x_{10}=2$ $u_{10,1}=2.9675379248404523+0.1(15.480151401776748 )=4.5155530650181275$ $u_{10,2}=1.2(15.48015140177674+0.2e^{1.9}=19.913 360570588" /> I expected a closer approximation than that. I don't know whether I've made an error or if the first order numerical method's convergence is to blame.
 April 19th, 2011, 07:57 AM #4 Newbie   Joined: Apr 2011 Posts: 2 Thanks: 0 Re: Solve second order differential equation(Euler's method) Dear MarkFL, I am so profoundly grateful to you for your help.

 Tags differential, equationeuler, method, order, solve

,
,
,

,

,

,

,

,

,

,

,

,

,

,

# euler method for 2nd order ode

Click on a term to search for related topics.
 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post nobodyuknow Differential Equations 4 February 25th, 2014 03:39 AM helloprajna Differential Equations 7 July 15th, 2013 09:26 PM DuckTutoh Applied Math 2 January 21st, 2013 11:05 AM Valar30 Differential Equations 2 May 24th, 2011 07:26 AM mbradar2 Differential Equations 3 October 8th, 2010 06:50 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top