Posts

Doolittle Algorithm: LU Decomposition Algorithm

Image
DOOLITTLE Algorithm In the numerical method Doolittle Algorithm : LU Decomposition Algorithm (where LU stands for Lower and Upper and also called LU factorization Algorithm) factors a matrix as the product of a lower triangular matrix and an upper triangular matrix. Computers usually solve square systems of linear equations using the LU decomposition, and it is also a key step when inverting a matrix, or computing the determinant of a matrix. Let A be a square matrix. An LU factorization algorithm refers to the factorization of A, with proper row and/or column orderings or permutations, into two factors, a lower triangular matrix L and an upper triangular matrix U,  A=LU . Assume that  A  has a Crout factorization  A  =  LU . 

Improved Euler's Method and Euler's Method with their C Program

Image
Improved Euler’s Method The Improved Euler’s method, also known as the Heun formula or the average slope method, gives a more accurate approximation than the Euler rule and gives an explicit formula for computing  y n+1 . The basic idea is to correct some errors of the original Euler's method. The syntax of the Improved Euler’s method is similar to that of the trapezoid rule, but the  y  value of the function in terms of  y n+1  consists of the sum of the  y  value and the product of  h  and the function in terms of  x n  and  y n .

Runge Kutta Method Formula and C Program

Image
Runge Kutta Method A Runge Kutta Method of numerically integrating ordinary differential equations by using a trial step at the midpoint of an interval to cancel out lower-order error terms. The second-order formula is

C Program for Shooting Method | C Programming

Introduction The  shooting method  is a method for solving a Boundary Value Problem by reducing it to the solution of an Initial Value Problem. Roughly speaking, we 'shoot' out trajectories in different directions until we find a trajectory that has the desired boundary value.

C Program for Laplace Algorithm | C Programming

Image
Laplace Algorithm Laplace’s approximation is one of the most fundamental asymptotic techniques for the estimation of integrals containing a large parameter or variable. For integrals of the form

C Program To Find The Value Using Poison Algorithm | C Programming

C Programming | C Program to find the value using poison algorithm #include<stdio.h> #include<conio.h> #include<math.h> #define g(x,y) 2*(x)*(x)*(y)*(y) int main(){ int n,i,j,k; float sum,error,E[10],a[10][10],b[10],new_x[10],old_x[10],tl,tr,tu,tb,h,buffer; printf("\nPoision's' \n"); printf("Enter the dimension of plate\n"); scanf("%d",&n); printf("\nEnter the dimension of grid\n"); scanf("%f",&h); printf("\nEnter the temperatures at left, right, bottom and top of the plate \n"); scanf("%f%f%f%f",&tl,&tr,&tb,&tu); //construction of coefficient matrix for(i=0;i<=n;i++) a[i][i]=-4; for(i=0;i<=n;i++) a[i][n-i]=0; for(i=0;i<=n;i++) for(j=0;j<=n;j++){ if(i!=j && j!=(n-i)) a[i][j]=1; } //Construction of RHS vector k=0; for(i=1;i<n;i++) for(j=1;j<n;j++) b[k++]=h*h*g(i,j); k=0; for(i=1;i<n;i++){ for(j=1;j&l

C program for Simpson's 1/3 Rule | C Programming

Image
C program for Simpson's 1/3 Rule  Before Starting the program let us know about the Simpson's 1/3 rule and How it works? Simpson’s 1/3 Rule The trapezoidal rule was based on approximating the integrand by a first-order polynomial and then integrating the polynomial over an interval of integration. Simpson’s 1/3 rule is an extension of the Trapezoidal rule where the integrand is approximated by a second-order polynomial.