Posts

Showing posts from January, 2020
Image
AKKY SRIVASTAVA AKASH

Trapezoidal Rule coding in C Language

Image
Trapezoidal Rule in C Language Here in this blog we will see how to evaluate the integration of function using the very easy and popular method i.e Trapezoidal Method. Later in the subsection of this blog we will see a program that evaluate the integration of given function in C Language. Approach:- First of all let's us discuss the rule or approach of this method. We approximate the function f(x) in the interval [xi ,xi+1] by a straight line joining the points (xi,yi) and (xi+1,yi+1). Popularity:- This method is very handy to calculate the integration of linear function. Geometrically, the integral in an interval is approximated by the area of a trapezium. Trapezoidal Rule Formula:- a[f(x)dx]b    =     h/2*{y0+yn+2*(y1+y2+y3+y4+.......................+yn-1)} where  a=lower limit of function f(x)                b=upper limit of function f(x)       ...

Simpson's 1/3rd Method solved in C language.

SIMPSON'S (1/3) RULE TO EVALUATE THE INTEGRATION OF FUNCTION. Here in this blog we will see how to code the problem of integration in C Language.  Approach:- First of all let's us explore the method of Simpson's rule. We evaluate the result of integration on solving the equation of parabolas/quadratic polynomial passing through the points (x0,y0) and (x1,y1) & (x2,y2) as so on............ Popularity:-                         It is popular because it integrates exactly cubic function or equivalently, gives the area under a segment of cubic curve.Unlike Trapezoidal rule integrates exactly a liner function only. Formula:- a[f(x)dx]b=h/3[y0+yn+4*(y1+y3+y5+.......+yn-1)+2*(y2+y4+y6+............+yn-2)] where a=lower limit of integration               b=upper limit of integration               h=height of interval ...