# User:Bchethan

## Contents

## Simple Exercise[edit]

What is x^{2}+2x+1 if x=1?

Solution:

4

## Sample Quiz[edit]

## Final Project[edit]

1)Solve differential equation y' = 3t^{2}y in [0,1] using Euler's method with n=10,y(0)=1.

Solution:

We need to find the solution ODE y' = 3t^{2}y using Euler's method.

y_{n+1}=y_{n}+hf(t_{n},y_{n})

We divide time span with number points to find the step size h.

h=tmax-tmin/n=1-0/10=0.1

y_{1}=y_{0}+hf(t_{0},y_{0})

=1.000000+.1x3x0^{2}x1

=1.000000

y_{2}=y_{1}+hf(t_{1},y_{1})

=1.000000+.1x3x0.1^{2}x1.000000

=1.003000

y_{3}=y_{2}+hf(t_{2},y_{2})

=1.003000+.1x3x0.2^{2}x1.003000

=1.0150360

y_{4}=y_{3}+hf(t_{3},y_{3})

=1.01503600+.1x3x0.3^{2}x1.0150360

=1.0424420

y_{5}=y_{4}+hf(t_{4},y_{4})

=1.0424420+.1x3x0.4^{2}x1.0424420

=1.0924792

y_{6}=y_{5}+hf(t_{5},y_{5})

=1.0924792+.1x3x0.5^{2}x1.0924792

=1.1744151

y_{7}=y_{6}+hf(t_{6},y_{6})

=1.1744151+.1x3x0.6^{2}x1.1744151

=1.3012520

y_{8}=y_{7}+hf(t_{7},y_{7})

=1.3012520+.1x3x0.7^{2}x1.3012520

=1.4925360

y_{9}=y_{8}+hf(t_{8},y_{8})

=1.4925360+.1x3x0.8^{2}x1.4925360

=1.7791029

y_{10}=y_{9}+hf(t_{9},y_{9})

=1.77910290+.1x3x0.9^{2}x1.7791029

=2.2114249

2)Solve differential equation y' = 2ty in [0,1] using RK2 method y_{n+1}=y_{n}+h/4(k_{1}+3K_{2}) where k_{1}=f(t_{n},y_{n}),k_{2}=f(t_{n}+2/3h,y_{n}+2/3hk_{1})with n=5,y(0)=1.

Solution:

We need to find the solution ODE y' = 2ty using RK second order method.

y_{n+1}=y_{n}+h/4(k_{1}+3K_{2})

k_{1}=f(t_{n},y_{n})

k_{2}=f(t_{n}+2/3h,y_{n}+2/3hk_{1})

y_{1}=y_{0}+h/4(k_{1}+3K_{2})

k_{1}=f(t_{0},y_{0})

=2x.0x1

=0

k_{2}=f(t_{0}+2/3h,y_{0}+2/3hk_{1})

=2x2/3x.2x1

=.26667

y_{1}=y_{0}+h/4(k_{1}+3K_{2})

=1+.2/4(0+3x.26667)

=1.04

y_{2}=y_{1}+h/4(k_{1}+3K_{2})

k_{1}=f(t_{1},y_{1})

=2x.2x1.04

=.416

k_{2}=f(t_{1}+2/3h,y_{1}+2/3hk_{1})

=f(.2+.13333,1.04+.0554667)

=.730304

y_{2}=y_{1}+h/4(k_{1}+3K_{2})

=1.04+.2/4(0.416+3x.730304)

=1.17035

y_{3}=y_{2}+h/4(k_{1}+3K_{2})

k_{1}=f(t_{2},y_{2})

=2x.4x1.17035

=.93648

k_{2}=f(t_{2}+2/3h,y_{2}+2/3hk_{1})

=.730304

y_{2}=y_{1}+h/4(k_{1}+3K_{2})

=1.04+.2/4(0.416+3x.730304)

=1.17035

3)Solve differential equation y' = 2ty in [0,1] using Two step Adams Bashforth method with n=5,y(0)=1.

Solution:

We need to find the solution ODE y' = 2ty using Two step Adams Bashforth method.

y_{n+2} = y_{n+1} + 3/2 x hf(t_{n+1},y_{n+1})-1/2 x hf(t_{n},y_{n})

Calculating h=1-0/5=0.2

We need two approxmations for calculating y_{2}

Calculating y_{1} using RK second order method.

y_{1}=1.04

y_{2} = y_{1} + 3/2 x hf(t_{1},y_{1})-1/2 x hf(t_{0},y_{0})

=1.04+3/2(.2)f(0.2,1.04)-1/2(0.2)f(0.0,1)

=1.1648

y_{3} = y_{2} + 3/2 x hf(t_{2},y_{2})-1/2 x hf(t_{1},y_{1})

=1.1648+3/2(.2)f(0.4,1.1648)-1/2(0.2)f(0.2,1.04)

=1.40275

y_{4} = y_{3} + 3/2 x hf(t_{2},y_{2})-1/2 x hf(t_{2},y_{2})

=1.40275+3/2(.2)f(0.6,1.40275)-1/2(0.2)f(0.4,1.1648)

=1.81456

y_{5} = y_{4} + 3/2 x hf(t_{4},y_{4})-1/2 x hf(t_{3},y_{3})

=1.81456+3/2(.2)f(0.8,1.81456)-1/2(0.2)f(0.6,1.40275)

=2.21333

y_{6} = y_{5} + 3/2 x hf(t_{5},y_{5})-1/2 x hf(t_{4},y_{4})

=2.21333+3/2(.2)f(1,2.21333)-1/2(0.2)f(0.8,1.81456)

=3.25098

## Final Project for User Bchethan[edit]

## Introduction[edit]

My final project is about adding exercises for different ODE methods to Wikiversity page.I have added exercises for Euler method,Multistep method and Runge Kutta method.

## Initial Experience[edit]

Prior to the final project I worked on small project as part of my homework.That was adding material to wikipidea page on Taylor's Approximation.I have gone through many books and decided to add few points to the existing information.I was corrected by Dr.Mohlenkamp on few of issues , after that I have modified the changes accordingly.After that I have realized that the changes were not required.So i have done more work for my final project and made sure that I won't repeat previous mistakes.

## Main Project[edit]

## Motivation[edit]

I found useful material on Wikipedia related to ODE methods but there were no solutions for examples.So I thought it will be useful to put some exercises and solution of it completely.I have gone through books and with the inspiration of it wrote few problems which are very easy but gives clear idea of method and solved it step by step.

## Changes[edit]

I have added Wikipedia pages on ODE methods to Numerical Analysis Wikiversity page and after that created exercise for Euler Method, Multistep Method and Runge Kutta method.If the user is not able to get solution they can refer solution which covered each step in detail.I have also created quiz which covers error order of ODE methods and stability of ODE methods.

## Reference[edit]

Guide to Numerical Analysis by Peter R. Turner