Use Euler's method to obtain a four-decimal approximation of the indicated value. Carry out the recursion of (3) in Section 2.6 yn + 1 = yn + hf(xn, yn) (3) by hand, first using h = 0.1 and then using h = 0.05. y' = 2x − 3y + 1, y(1) = 9; y(1.2) y(1.2) ≈ (h = 0.1) y(1.2) ≈ (h = 0.05)

Respuesta :

Answer:

At h=0.1 value od y(1.2)=15.920, and at h=0.05, y(1.2)=16.523.

Step-by-step explanation:

Given,

[tex]f(x,y)=\frac{dy}{dx}=2x+3y+1[/tex] with y(1)=9.

That is when x=1 then y=9 initially.

To find value of y= f(x,y) at [tex]x_n=x_0+nh=1.2[/tex] when y=0.1 and y=0.05 we will use c-programme  of Eular method we get, for h=0.1 :

#include<stdio.h>

float fun(float x, float y)

{

  float f;

  f=2x+3y+1;

  return f;

}

main()

{

   float a,b,x,y,h,t,k;

   printf("\ Enter x0,y0,h,xn:");

   scanf("% f % f % f % f ", & a, &b, &h, &t);

   x=a;

   y=b;

   printf("\n x\t y\n");

   while (x<=t)

{

   k=h*fun(x,y);

   x=x+h;

   y=y+k;

   printf("%0.3f\%0.3f\n",x,y);

}

}

By putting value x0=1, y0=9, h=0.1, xn=1.2  we will get results as, y(1.2)=15.920.

Again by putting values x0=1, y0=9, 0.h=05, xn=1.2 we get y(1.2)=16.523.