Showing posts with label Numerical Analysis. Show all posts
Showing posts with label Numerical Analysis. Show all posts

Thursday, October 20, 2022

if an ODE is given as y'= y + 2x + 1 with y(0)= 1 and h = 0.1 Find the numerical solution.

 

Question : if an ODE is given as

                                 y'= y + 2x + 1 with y(0)= 1 and h = 0.1

Find the numerical solution.

Answer:



write a system of linear equation representing any physical phenomena 〖7x〗_1+〖6x〗_2+〖3x〗_3=19 3x1+2x2 - x3 = 7 x1 + 4x2 + 2x3 = 19 (i) Solve the system by analytical method(gauss elimination /cramer’s/LUfactorization) (ii) Solve the system by numerical method(Jacobi) (iii) Compare the answers.

 Question : write a system of linear equation representing any physical phenomena 

                                                            〖7x〗_1+〖6x〗_2+〖3x〗_3=19

                                                                         3x1+2x2 - x3 = 7

                                                                   x1 + 4x2 + 2x3 = 19

(i)                  Solve the system by analytical method(gauss elimination /cramer’s/LUfactorization)    

(ii)                Solve the system by numerical method(Jacobi)                                                         

(iii)               Compare the answers.

Answer:







If the given function is continuous and having a root in [-1, a] where a= (last three digits of registration no as 1.23) f(x)=e^x cos⁡x (i) Find the root using a bracketing (bisection/false position) method. (ii) Find the root using an iterative (newton Raphson/fixed point) method

 Question : If the given function is continuous and having a root in [-1, a] where

a= (last three digits of registration no as 1.23) 

    f(x)=e^x  cos⁡x

(i)                  Find the root using a bracketing (bisection/false position) method.                                    

(ii)                Find the root using an iterative (newton Raphson/fixed point) method.                           

Answer:




Friday, August 20, 2021

Numerical analysis-chapter#2 Finite differences-full solution

https://drive.google.com/file/d/1_waH0A7PSDjFiP9-szOdb1F8CTsffgwz/view?usp=sharing 

Find the value of y at x = 0 given some set of values (-2, 5), (1, 7), (3, 11), (7, 34)?,Lagrange Interpolation Formula

 

Lagrange Interpolation Formula

Lagrange polynomials are used for polynomial interpolation. For a given set of distinct points $x_{j}$ and numbers $y_{j}$. Lagrange’s interpolation is also an $N^{th}$ degree polynomial approximation to f(x).

Find the Lagrange Interpolation Formula given below,

lagrange


Question: Find the value of y at x = 0 given some set of values (-2, 5), (1, 7), (3, 11), (7, 34)?

Solution:

Given the known values are,


x = 0 ; $x_{0}$ = -2 ; $x_{1}$ = 1 ; $x_{2}$= 3 ; $x_{3}$ = 7 ; $y_{0}$ = 5 ; $y_{1}$ = 7 ; $y_{2}$ = 11 ; $y_{3}$ = 34


Using the interpolation formula,

y = $\frac{(x-x_{1})(x-x_{2})…..(x-x_{n})}{(x_{0}-x_{1})(x_{0}-x_{2})…..(x_{0}-x_{n})}$ $y_{0}$ + $\frac{(x-x_{0})(x-x_{2})…..(x-x_{n})}{(x_{1}-x_{0})(x_{1}-x_{2})…..(x_{1}-x_{n})}$ $y_{1}$ + …. + $\frac{(x-x_{1})(x-x_{1})…..(x-x_{n-1})}{(x_{n}-x_{0})(x_{0}-x_{1})…..(x_{n}-x_{n-1})}$ $y_{n}$


y = $\frac{(0-1)(0-3)(0-7)}{(-2-1)(-2-3)(-2-7)}$ $\times$ 5 + $\frac{(0+2)(0-3)(0-7)}{(1+2)(1-3)(1-7)}$ $\times$ 7 + $\frac{(0+2)(0-1)(0-7)}{(3+2)(3-1)(3-7)}$ $\times$ 11 + $\frac{(0+2)(0-1)(0-3)}{(7+2)(7-1)(7-3)}$ $\times$ 34

y = $\frac{21}{27}$ + $\frac{49}{6}$ + $\frac{-77}{20}$ + $\frac{51}{54}$

y = $\frac{1087}{180}$