Step 1

To approximate y(1.2)by RK-4

Given h = 0.1 and \(\displaystyle{x}{y}'={y}-{2}{x}^{{2}},{y}{\left({1}\right)}={2}\)

\(\displaystyle{y}'=\frac{{y}}{{x}}-{2}{x}\)

Here \(\displaystyle{f{{\left({x},{y}\right)}}}=\frac{{y}}{{x}}-{2}{x}\)

Fourth order RK method is given by

\(\displaystyle{k}_{{1}}={h}{f{{\left({x}_{{0}},{y}_{{0}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1},{2}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left({0}\right)}={0}\)

\(\displaystyle{k}_{{2}}={h}{f{{\left({x}_{{0}}+\frac{{h}}{{2}},{y}_{{0}}+\frac{{k}_{{1}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.05},{2}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.19524}\right)}\)

\(\displaystyle=-{0.01952}\)

\(\displaystyle{k}_{{3}}={h}{f{{\left({x}_{{0}}+\frac{{h}}{{2}},{y}_{{0}}+\frac{{k}_{{2}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.05},{1.99024}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.20454}\right)}\)

=-0.02045

\(\displaystyle{k}_{{4}}={h}{f{{\left({x}_{{0}}+{h},{y}_{{0}}+{k}_{{3}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.1},{1.97955}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.40041}\right)}\)

=-0.04004

\(\displaystyle{y}_{{1}}={y}_{{0}}+\frac{{1}}{{6}}{\left({k}_{{1}}+{2}{k}_{{2}}+{2}{k}_{{3}}+{k}_{{4}}\right)}\)

\(\displaystyle{y}_{{1}}={2}+\frac{{1}}{{6}}{\left({0}+{2}{\left(-{0.01952}\right)}+{2}{\left(-{0.02045}\right)}+{\left(-{0.004004}\right)}\right)}\)

\(\displaystyle{y}_{{1}}={1.986}\)

Hence y(1.1)=1.98601

Step 2

Again taking \(\displaystyle{\left({x}_{{1}},{y}_{{1}}\right)}\in{p}{l}{a}{c}{e}{o}{f{{\left({x}_{{0}},{y}_{{0}}\right)}}}\) repeat the process

\(\displaystyle{k}_{{1}}={h}{f{{\left({x}_{{1}},{y}_{{1}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.1},{1.98601}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.394536}\right)}\)

=-0.0394536

\(\displaystyle{k}_{{2}}={h}{f{{\left({x}_{{1}}+\frac{{h}}{{2}},{y}_{{1}}+\frac{{k}_{{1}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.15},{1.9662832}\right)}}}\)

\(\displaystyle{\left({0.1}\right)}\cdot{\left(-{0.590188}\right)}\)

=-0.0590188

\(\displaystyle{k}_{{3}}={h}{f{{\left({x}_{{1}}+\frac{{h}}{{2}},{y}_{{1}}+\frac{{k}_{{2}}}{{2}}\right)}}}\)

\(\displaystyle{\left({0.1}\right)}{f{{\left({1.15},{1.9565006}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.598695130}\right)}\)

=-0.0598695

\(\displaystyle{k}_{{4}}={h}{f{{\left({x}_{{1}}+{h},{y}_{{1}}+{k}_{{3}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.2},{1.9261405}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.79488}\right)}\)

=-0.079488

\(\displaystyle{y}_{{2}}={y}_{{1}}+\frac{{1}}{{6}}{\left({k}_{{1}}+{2}{k}_{{2}}+{2}{k}_{{3}}+{k}_{{4}}\right)}\)

\(\displaystyle{y}_{{2}}={1.98}+\frac{{1}}{{6}}{\left[-{0.0394536}+{2}{\left(-{0.0590188}\right)}+{2}{\left(-{0.0598695}\right)}+{\left(-{0.079488}\right)}\right]}\)

\(\displaystyle{y}_{{2}}={1.92055}\)

Hence y(1.2)=1.92055

To approximate y(1.2)by RK-4

Given h = 0.1 and \(\displaystyle{x}{y}'={y}-{2}{x}^{{2}},{y}{\left({1}\right)}={2}\)

\(\displaystyle{y}'=\frac{{y}}{{x}}-{2}{x}\)

Here \(\displaystyle{f{{\left({x},{y}\right)}}}=\frac{{y}}{{x}}-{2}{x}\)

Fourth order RK method is given by

\(\displaystyle{k}_{{1}}={h}{f{{\left({x}_{{0}},{y}_{{0}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1},{2}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left({0}\right)}={0}\)

\(\displaystyle{k}_{{2}}={h}{f{{\left({x}_{{0}}+\frac{{h}}{{2}},{y}_{{0}}+\frac{{k}_{{1}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.05},{2}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.19524}\right)}\)

\(\displaystyle=-{0.01952}\)

\(\displaystyle{k}_{{3}}={h}{f{{\left({x}_{{0}}+\frac{{h}}{{2}},{y}_{{0}}+\frac{{k}_{{2}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.05},{1.99024}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.20454}\right)}\)

=-0.02045

\(\displaystyle{k}_{{4}}={h}{f{{\left({x}_{{0}}+{h},{y}_{{0}}+{k}_{{3}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.1},{1.97955}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.40041}\right)}\)

=-0.04004

\(\displaystyle{y}_{{1}}={y}_{{0}}+\frac{{1}}{{6}}{\left({k}_{{1}}+{2}{k}_{{2}}+{2}{k}_{{3}}+{k}_{{4}}\right)}\)

\(\displaystyle{y}_{{1}}={2}+\frac{{1}}{{6}}{\left({0}+{2}{\left(-{0.01952}\right)}+{2}{\left(-{0.02045}\right)}+{\left(-{0.004004}\right)}\right)}\)

\(\displaystyle{y}_{{1}}={1.986}\)

Hence y(1.1)=1.98601

Step 2

Again taking \(\displaystyle{\left({x}_{{1}},{y}_{{1}}\right)}\in{p}{l}{a}{c}{e}{o}{f{{\left({x}_{{0}},{y}_{{0}}\right)}}}\) repeat the process

\(\displaystyle{k}_{{1}}={h}{f{{\left({x}_{{1}},{y}_{{1}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.1},{1.98601}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.394536}\right)}\)

=-0.0394536

\(\displaystyle{k}_{{2}}={h}{f{{\left({x}_{{1}}+\frac{{h}}{{2}},{y}_{{1}}+\frac{{k}_{{1}}}{{2}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.15},{1.9662832}\right)}}}\)

\(\displaystyle{\left({0.1}\right)}\cdot{\left(-{0.590188}\right)}\)

=-0.0590188

\(\displaystyle{k}_{{3}}={h}{f{{\left({x}_{{1}}+\frac{{h}}{{2}},{y}_{{1}}+\frac{{k}_{{2}}}{{2}}\right)}}}\)

\(\displaystyle{\left({0.1}\right)}{f{{\left({1.15},{1.9565006}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.598695130}\right)}\)

=-0.0598695

\(\displaystyle{k}_{{4}}={h}{f{{\left({x}_{{1}}+{h},{y}_{{1}}+{k}_{{3}}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}{f{{\left({1.2},{1.9261405}\right)}}}\)

\(\displaystyle={\left({0.1}\right)}\cdot{\left(-{0.79488}\right)}\)

=-0.079488

\(\displaystyle{y}_{{2}}={y}_{{1}}+\frac{{1}}{{6}}{\left({k}_{{1}}+{2}{k}_{{2}}+{2}{k}_{{3}}+{k}_{{4}}\right)}\)

\(\displaystyle{y}_{{2}}={1.98}+\frac{{1}}{{6}}{\left[-{0.0394536}+{2}{\left(-{0.0590188}\right)}+{2}{\left(-{0.0598695}\right)}+{\left(-{0.079488}\right)}\right]}\)

\(\displaystyle{y}_{{2}}={1.92055}\)

Hence y(1.2)=1.92055