Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Shlok Dixit/
  3. Week 3.5 - Deriving 4th order approximation of a 2nd order derivative using Taylor Table method

Week 3.5 - Deriving 4th order approximation of a 2nd order derivative using Taylor Table method

AIM:                To derive the fourth order approximations of a second order derivative using central differencing scheme, skewed right sided difference and skewed left sided difference with the help of taylor table method and to compare the analytical…

  • HTML
  • Shlok Dixit

    updated on 18 Jul 2023

AIM:

               To derive the fourth order approximations of a second order derivative using central differencing scheme, skewed right sided difference and skewed left sided difference with the help of taylor table method and to compare the analytical derivative with obtained values for the given function.

SCHEME DERIVATIONS:

CENTRAL DIFFERENCING SCHEME:

NO OF NODES:

The number of nodes = p+q-1

Where, p is order of derivative.

           q is order of approximations.

The no of nodes = 2+4-1 =>5.

DERIVATION:

To derive a fourth order approximation for the second order derivative,we start with these approximation,

∂2u∂x2=af(i−2)+bf(i−1)+cf(i)+df(i+1)+ef(i+2)dx2

..........(1)

taylor series derivation for the above terms,

af(i−2)=af(i)−2af'(i)dx1!+4af''(i)dx22!+8af'''(i)dx33!+16af''''(i)dx44!

the linear equation obtained from the above table are solved using matrix inversion method,

A.X = B

a=-0.0833, b=1.3333, c=-2.5000, d=1.3333 e=-0.0833

substituting these coefficient in equation(1) we get,

∂2u∂x2=(−0.0833)f(i−2)+(1.3333)f(i−1)+(−2.5000)f(i)+(1.3333)f(i+1)+(−0.0833)f(i+2)dx2

SKEWED RIGHT HAND DIFFERENCE SCHEME:

 NO OF NODES:

The number of nodes = p+q

Where, p is order of derivative.

           q is order of approximations.

The no of nodes = 2+4 =>6.

DERIVATION:

To derive a fourth order approximation for the second order derivative,we start with these approximation,

∂2u∂x2=af(i)+bf(i+1)+cf(i+2)+df(i+3)+ef(i+4)+gf(i+5)dx2

..........(2)

the linear equation obtained

MAT CODE

clear all
close all
clc
%value of x
x= pi/3;
%range of dx
dx= linspace(pi/4,pi/4000,20);
%for loop
for i=1:length(dx)
 
central_differencing(i) = fourth_order_central_differencing(x,dx(i));
 
right_sided_skew(i) = fourth_order_right_sided_skew(x,dx(i));
 
left_sided_skew(i) = fourth_order_left_sided_skew(x,dx(i));
 
end
%plotting
figure(1)
loglog(dx,central_differencing,'r')
hold on
loglog(dx,right_sided_skew,'g')
hold on
loglog(dx,left_sided_skew,'b')
xlabel('range of dx')
ylabel('truncation error')
title('range of dx vs error')
legend('central differencing','skewed right sided difference','skewed left sided difference','location','northwest')
 
 
CODE FOR CENTRAL DIFFRENCING
function Error_central_differencing = fourth_order_central_differencing(x,dx)
% analytic function = exp(x)*cos(x)
% analytic derivative
%f''(x) = -2*exp(x)*sin(x)
analytical_derivative = -2*exp(x)*sin(x);
%numerical derivative
%central differencing
central_differencing = (((-0.0833)*((exp(x-(2*dx)))*(cos(x-(2*dx)))))+((1.3333)*((exp(x-dx))*(cos(x-dx))))-((2.5000)*((exp(x))*(cos(x))))+((1.3333)*((exp(x+dx))*(cos(x+dx))))-((0.0833)*((exp(x+(2*dx)))*(cos(x+(2*dx))))))/(dx^2);
%error
Error_central_differencing = abs(central_differencing- analytical_derivative);
end
 
 FUNCTION CODE FOR SKEWED RIGHT SIDED DIFFERENCE:
function Error_right_sided_skew = fourth_order_right_sided_skew(x,dx)
% analytic function = exp(x)*cos(x)
% analytic derivative
%f''(x) = -2*exp(x)*sin(x)
analytical_derivative = -2*exp(x)*sin(x);
%numerical derivative
%central differencing
right_sided_skew = (((3.7500)*((exp(x))*(cos(x))))-((12.8333)*((exp(x+dx))*(cos(x+dx))))+((17.8333)*((exp(x+(2*dx)))*(cos(x+(2*dx)))))-((13.0000)*((exp(x+(3*dx)))*(cos(x+(3*dx)))))+((5.0833)*((exp(x+(4*dx)))*(cos(x+(4*dx)))))-((0.8333)*((exp(x+(5*dx)))*(cos(x+(5*dx))))))/(dx^2);
%error
Error_right_sided_skew = abs(right_sided_skew- analytical_derivative);
end
FUNCTION CODE FOR SKEWED LEFT SIDED DIFFERENCE:
function Error_left_sided_skew = fourth_order_left_sided_skew(x,dx)
% analytic function = exp(x)*cos(x)
% analytic derivative
%f''(x) = -2*exp(x)*sin(x)
analytical_derivative = -2*exp(x)*sin(x);
%numerical derivative
%central differencing
left_sided_skew = (((-0.8333)*((exp(x-(5*dx)))*(cos(x-(5*dx)))))+((5.0833)*((exp(x-(4*dx)))*(cos(x-(4*dx)))))-((13.0000)*((exp(x-(3*dx)))*(cos(x-(3*dx)))))+((17.8333)*((exp(x-(2*dx)))*(cos(x-(2*dx)))))-((12.8333)*((exp(x-dx))*(cos(x-dx))))+((3.7500)*((exp(x))*(cos(x)))))/(dx^2);
%error
Error_left_sided_skew = abs(left_sided_skew- analytical_derivative);
end
 
OUTPUT GRAPH AND PLOT

CONCLUSION:

               As seen from the plot, the central differencing scheme has very less error compared to other schemes. Therefore, central differencing is better than other schemes because it uses information from both the sides from the point of consideration to give approximative and accurate values.

               As the left and right skewed difference methods uses data only from one side of point of interest it gives less approximative and accurate values about the point.

 
 

Leave a comment

Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by Shlok Dixit (16)

Week 3 - External flow simulation over an Ahmed body.

Objective:

Hello this is Shlok here in this we are going to discuss about the Ahmed bodyCimulation in CFD Ansys Fluent So beofre going furthur lets get a few details about Ahmed Body Ahmed body is a simplified vehicle body used for capturing basic yet charecteristic features seen in objects used in the automobile industry. It is…

calendar

01 Aug 2023 12:27 PM IST

  • CFD
  • HTML
Read more

Week 3.5 - Deriving 4th order approximation of a 2nd order derivative using Taylor Table method

Objective:

AIM:                To derive the fourth order approximations of a second order derivative using central differencing scheme, skewed right sided difference and skewed left sided difference with the help of taylor table method and to compare the analytical…

calendar

18 Jul 2023 09:03 AM IST

  • HTML
Read more

Week 2 - Flow over a Cylinder.

Objective:

Aim: To Simulate the flow over a cylinder and explain the phenomenon of Karman vortex street Objective: 1.To Calculate the coefficient of drag and lift over a cylinder by setting the Reynolds number to 10,100,1000,10000 & 100000. (Run with steady solver) 2.Simulate the flow with the steady and unsteady case…

calendar

11 Jul 2023 05:55 PM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • FEA
  • GIS
  • HEV
  • MBD
Read more

Project 1 : CFD Meshing for Tesla Cyber Truck

Objective:

Objective : To Identifying & cleanup all the topological errors in the given Tesla Cyber Truck Car model. To create a surface mesh. To Create a wind tunnel around Tesla Cyber Truck Car . To create a volumetric mesh to perform an external flow CFD analysis simulation.   Introduction : ANSA :…

calendar

26 Feb 2023 04:02 PM IST

  • ANSA
  • CAE
  • CFD
  • RADIOSS
Read more

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

Related Courses

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

logo

Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

Our Company

News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
map
EpowerX Learning Technologies Pvt Ltd.
4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
mail
info@skill-lync.com
mail
ITgrievance@skill-lync.com

Top Individual Courses

Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

Top PG Programs

Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

Skill-Lync Plus

Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

Trending Blogs

How to Learn CAD Design: Step-by-Step GuideGD&T Basics: How to Read and Apply GD&T Symbols SolidWorks vs Creo: Best CAD Software to Learn for Mechanical Engineers Engineering Edtech in India: Busting Myths & Building Careers How to Get a Core Mechanical Engineering Job After Graduation

© 2025 Skill-Lync Inc. All Rights Reserved.

              Do You Want To Showcase Your Technical Skills?
              Sign-Up for our projects.