This project report describes Rajesh Aggarwal's summer research fellowship project on spectral methods for solving differential equations under the guidance of Dr. Pravin Kumar Gupta at IIT Roorkee from June 11, 2014 to August 6, 2014. The report provides background on analytical and numerical methods for solving differential equations, specifically conventional finite difference methods and spectral finite difference methods. It then describes the methodology, codes, and results of applying both methods to solve sample differential equations on a half-space and layered earth problems. Tables and graphs comparing the accuracy of the two methods are presented.
1) Ordinary differential equations relate a dependent variable to one or more independent variables by means of differential coefficients. They can be classified based on order, degree, whether they are linear or non-linear, and type (exact, separable variables, homogeneous).
2) First order differential equations can sometimes be solved by separation of variables, or by finding an integrating factor. Homogeneous equations can be transformed by substitution.
3) Second order linear differential equations can be reduced to a system of two first order equations. The complementary function and particular solutions combine to form the general solution. Unequal or equal roots of the characteristic equation determine the form of the complementary function.
Series solutions at ordinary point and regular singular pointvaibhav tailor
The document discusses series solutions for second order linear differential equations near ordinary and regular singular points.
It defines an ordinary point as a point where the functions p(x) and q(x) in the normalized form of the differential equation are analytic. Near an ordinary point, there exist two linearly independent power series solutions of the form Σcn(x-a)n that converge within the radii of convergence of p(x) and q(x).
It also discusses finding series solutions near a regular singular point x0=0, where the limits of p(x) and q(x) as x approaches 0 exist. An initial guess of a power series solution with exponent r is made, and the
This document introduces the concept of double integrals and iterated integrals. It defines a double integral as the limit of double Riemann sums that approximate the volume under a function of two variables over a rectangular region. An iterated integral first integrates with respect to one variable, holding the other constant, resulting in a function of the remaining variable which is then integrated. This allows exact calculation of double integrals by integrating in two steps rather than approximating volume with boxes.
This document discusses higher order differential equations and their applications. It introduces second order homogeneous differential equations and their solutions based on the nature of the roots. Non-homogeneous differential equations are also discussed, along with their general solution being the sum of the solution to the homogeneous equation and a particular solution. Methods for solving non-homogeneous equations are presented, including undetermined coefficients and reduction of order. Applications to problems in various domains like physics, engineering, and circuits are also outlined.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
This document summarizes lecture two on process control fundamentals. It discusses analytical and numerical methods for solving ordinary differential equations (ODEs). Analytical solutions using techniques like Laplace transforms are preferred when possible as they provide insights into system behavior and relationships between variables. Numerical methods like Euler and Runge-Kutta are used when analytical solutions cannot be derived, though they lose some insight. Examples demonstrate solving ODEs for concentration changes in a continuous stirred tank reactor using both approaches.
This document provides an introduction to differential equations. It defines a differential equation as an equation containing an unknown function and its derivatives. Ordinary differential equations are presented, along with definitions of the order and degree of a differential equation. Methods for solving differential equations are introduced, including Taylor series methods, Euler's method, and error analysis. Examples are provided to demonstrate applying these methods.
This presentation gives the basic idea about the methods of solving ODEs
The methods like variation of parameters, undetermined coefficient method, 1/f(D) method, Particular integral and complimentary functions of an ODE
1) Ordinary differential equations relate a dependent variable to one or more independent variables by means of differential coefficients. They can be classified based on order, degree, whether they are linear or non-linear, and type (exact, separable variables, homogeneous).
2) First order differential equations can sometimes be solved by separation of variables, or by finding an integrating factor. Homogeneous equations can be transformed by substitution.
3) Second order linear differential equations can be reduced to a system of two first order equations. The complementary function and particular solutions combine to form the general solution. Unequal or equal roots of the characteristic equation determine the form of the complementary function.
Series solutions at ordinary point and regular singular pointvaibhav tailor
The document discusses series solutions for second order linear differential equations near ordinary and regular singular points.
It defines an ordinary point as a point where the functions p(x) and q(x) in the normalized form of the differential equation are analytic. Near an ordinary point, there exist two linearly independent power series solutions of the form Σcn(x-a)n that converge within the radii of convergence of p(x) and q(x).
It also discusses finding series solutions near a regular singular point x0=0, where the limits of p(x) and q(x) as x approaches 0 exist. An initial guess of a power series solution with exponent r is made, and the
This document introduces the concept of double integrals and iterated integrals. It defines a double integral as the limit of double Riemann sums that approximate the volume under a function of two variables over a rectangular region. An iterated integral first integrates with respect to one variable, holding the other constant, resulting in a function of the remaining variable which is then integrated. This allows exact calculation of double integrals by integrating in two steps rather than approximating volume with boxes.
This document discusses higher order differential equations and their applications. It introduces second order homogeneous differential equations and their solutions based on the nature of the roots. Non-homogeneous differential equations are also discussed, along with their general solution being the sum of the solution to the homogeneous equation and a particular solution. Methods for solving non-homogeneous equations are presented, including undetermined coefficients and reduction of order. Applications to problems in various domains like physics, engineering, and circuits are also outlined.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
This document summarizes lecture two on process control fundamentals. It discusses analytical and numerical methods for solving ordinary differential equations (ODEs). Analytical solutions using techniques like Laplace transforms are preferred when possible as they provide insights into system behavior and relationships between variables. Numerical methods like Euler and Runge-Kutta are used when analytical solutions cannot be derived, though they lose some insight. Examples demonstrate solving ODEs for concentration changes in a continuous stirred tank reactor using both approaches.
This document provides an introduction to differential equations. It defines a differential equation as an equation containing an unknown function and its derivatives. Ordinary differential equations are presented, along with definitions of the order and degree of a differential equation. Methods for solving differential equations are introduced, including Taylor series methods, Euler's method, and error analysis. Examples are provided to demonstrate applying these methods.
This presentation gives the basic idea about the methods of solving ODEs
The methods like variation of parameters, undetermined coefficient method, 1/f(D) method, Particular integral and complimentary functions of an ODE
A graph consists of a set of vertices and edges connecting pairs of vertices. Graph coloring assigns colors to vertices such that no adjacent vertices share the same color. The chromatic polynomial counts the number of valid colorings of a graph using a given number of colors. It was introduced to study the four color theorem and fundamental results were established in the early 20th century. The chromatic polynomial can be used to find the chromatic number of a graph.
Series solution of ordinary differential equation
advance engineering mathematics
The power series method is the standard method for solving linear ODEs with variable
coefficients. It gives solutions in the form of power series. These series can be used for computing values, graphing curves, proving formulas, and exploring properties of
solutions, as we shall see.
The document summarizes the complex form of Fourier series. It states that after substituting sine and cosine terms into the Fourier series formula, the complex form involves a summation of terms with coefficients multiplied by exponential terms with integer multiples of i and x. It provides the formulas for calculating the coefficients c0, c1, c2, etc. and gives an example function defined over an interval to demonstrate the complex form.
The document discusses the Z-transform, which is a tool for analyzing and solving linear time-invariant difference equations. It defines the Z-transform, provides examples of common sequences and their corresponding Z-transforms, and discusses properties such as the region of convergence. Key topics covered include the difference between difference and differential equations, properties of linear time-invariant systems, and mapping between the s-plane and z-plane.
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAYESHA JAVED
1) The document discusses modeling and applications of second order differential equations. It provides examples of second order differential equations that model vibrating springs and electric current circuits.
2) Solving second order differential equations involves finding the complementary function and particular integral. The type of roots in the auxiliary equation determines the form of the complementary function.
3) An example solves a second order differential equation modeling a vibrating spring to find the position of a mass attached to the spring at any time.
The document defines the trapezoidal rule for approximating definite integrals. It provides the trapezoidal formula, explains the geometric interpretation of dividing the region into trapezoids, and outlines an algorithm and flowchart for implementing the trapezoidal rule in Python. Sample problems applying the trapezoidal rule are included to evaluate definite integrals numerically.
The document discusses the Method of Frobenius for solving ordinary differential equations (ODEs) with singular points. It states that the solution for such an ODE is given as an infinite series involving powers of x. To determine the coefficients in the series, one substitutes the series solution into the original ODE, equates coefficients of like powers of x, and obtains the indical equation. Solving this indical equation gives the indicial solution and recurrence relations for the coefficients.
The velocity of a vector function is the absolute value of its tangent vector. The speed of a vector function is the length of its velocity vector, and the arc length (distance traveled) is the integral of speed.
This document discusses first order differential equations. It defines differential equations and classifies them as ordinary or partial based on whether they involve derivatives with respect to a single or multiple variables. First order differential equations are classified into four types: variable separable, homogeneous, linear, and exact. The document provides examples of each type and explains their general forms and solution methods like separating variables, making substitutions, and integrating.
This document defines Sturm-Liouville boundary value problems (SL-BVPs) and Sturm-Liouville eigenvalue problems (SL-EVPs). It discusses regular, singular, and periodic SL-BVPs. Two examples are presented in detail: one with separated boundary conditions and one with periodic boundary conditions. Properties of regular and periodic SL-BVPs are discussed, including that eigenvalues are real and eigenfunctions corresponding to distinct eigenvalues are orthogonal with respect to the weight function. The document proves several properties and establishes that regular SL-BVPs have an infinite sequence of eigenvalues.
First order linear differential equationNofal Umair
1. A differential equation relates an unknown function and its derivatives, and can be ordinary (involving one variable) or partial (involving partial derivatives).
2. Linear differential equations have dependent variables and derivatives that are of degree one, and coefficients that do not depend on the dependent variable.
3. Common methods for solving first-order linear differential equations include separation of variables, homogeneous equations, and exact equations.
The document presents information about differential equations including:
- A definition of a differential equation as an equation containing the derivative of one or more variables.
- Classification of differential equations by type (ordinary vs. partial), order, and linearity.
- Methods for solving different types of differential equations such as variable separable form, homogeneous equations, exact equations, and linear equations.
- An example problem demonstrating how to use the cooling rate formula to calculate the time of death based on measured body temperatures.
This document discusses differential equations and their solutions. It defines differential equations as equations involving derivatives. It notes that solutions can be general, containing an arbitrary constant, or particular, containing an initial value. Examples are given of separating variables and integrating to find the general solution to first order differential equations.
This document outlines the 7 steps for sketching the curve of a function: 1) Determine the domain, 2) Find critical points, 3) Determine graph direction and max/min, 4) Use the second derivative to find concavity and points of inflection, 5) Find asymptotes, 6) Find intercepts and important points, 7) Combine evidence to graph the function. Key tests are outlined for max/min, concavity, and points of inflection using the first and second derivatives.
The document provides an introduction to partial differential equations (PDEs). Some key points:
- PDEs involve functions of two or more independent variables, and arise in physics/engineering problems.
- PDEs contain partial derivatives with respect to two or more independent variables. Examples of common PDEs are given, including the Laplace, wave, and heat equations.
- The order of a PDE is defined as the order of the highest derivative. Methods for solving PDEs through direct integration and using Lagrange's method are briefly outlined.
critical points/ stationary points , turning points,Increasing, decreasing functions, absolute maxima & Minima, Local Maxima & Minima , convex upward & convex downward - first & second derivative tests.
This document discusses the Laplace transform of periodic functions. It begins by defining a periodic function f(t) and derives the Laplace transform of f(t) as an infinite sum. Several examples are then worked through to demonstrate finding the Laplace transform of square waves, triangular waves, and other periodic functions. Transform properties and techniques like using gate functions are employed in the examples. Reference books on circuit analysis and Laplace transforms are also listed.
Gamma Function mathematics and history.
Please send comments and suggestions for improvements to solo.hermelin@gmail.com. Thanks.
More presentations on different subjects can be found on my website at http://www.solohermelin.com.
Numerical Solutions of Burgers' Equation Project ReportShikhar Agarwal
This report summarizes the use of finite element methods to numerically solve Burgers' equation. It introduces finite element methods and the Galerkin method for approximating solutions. MATLAB codes are presented to solve example boundary value problems and differential equations. The method of quasi-linearization is also described for solving Burgers' equation numerically. The report concludes that finite element methods can accurately predict numerical solutions that are close to exact solutions for problems where no closed-form solution exists.
EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...cscpconf
In this paper, based on the definition of conformable fractional derivative, the functional
variable method (FVM) is proposed to seek the exact traveling wave solutions of two higherdimensional
space-time fractional KdV-type equations in mathematical physics, namely the
(3+1)-dimensional space–time fractional Zakharov-Kuznetsov (ZK) equation and the (2+1)-
dimensional space–time fractional Generalized Zakharov-Kuznetsov-Benjamin-Bona-Mahony
(GZK-BBM) equation. Some new solutions are procured and depicted. These solutions, which
contain kink-shaped, singular kink, bell-shaped soliton, singular soliton and periodic wave
solutions, have many potential applications in mathematical physics and engineering. The
simplicity and reliability of the proposed method is verified.
A graph consists of a set of vertices and edges connecting pairs of vertices. Graph coloring assigns colors to vertices such that no adjacent vertices share the same color. The chromatic polynomial counts the number of valid colorings of a graph using a given number of colors. It was introduced to study the four color theorem and fundamental results were established in the early 20th century. The chromatic polynomial can be used to find the chromatic number of a graph.
Series solution of ordinary differential equation
advance engineering mathematics
The power series method is the standard method for solving linear ODEs with variable
coefficients. It gives solutions in the form of power series. These series can be used for computing values, graphing curves, proving formulas, and exploring properties of
solutions, as we shall see.
The document summarizes the complex form of Fourier series. It states that after substituting sine and cosine terms into the Fourier series formula, the complex form involves a summation of terms with coefficients multiplied by exponential terms with integer multiples of i and x. It provides the formulas for calculating the coefficients c0, c1, c2, etc. and gives an example function defined over an interval to demonstrate the complex form.
The document discusses the Z-transform, which is a tool for analyzing and solving linear time-invariant difference equations. It defines the Z-transform, provides examples of common sequences and their corresponding Z-transforms, and discusses properties such as the region of convergence. Key topics covered include the difference between difference and differential equations, properties of linear time-invariant systems, and mapping between the s-plane and z-plane.
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONSAYESHA JAVED
1) The document discusses modeling and applications of second order differential equations. It provides examples of second order differential equations that model vibrating springs and electric current circuits.
2) Solving second order differential equations involves finding the complementary function and particular integral. The type of roots in the auxiliary equation determines the form of the complementary function.
3) An example solves a second order differential equation modeling a vibrating spring to find the position of a mass attached to the spring at any time.
The document defines the trapezoidal rule for approximating definite integrals. It provides the trapezoidal formula, explains the geometric interpretation of dividing the region into trapezoids, and outlines an algorithm and flowchart for implementing the trapezoidal rule in Python. Sample problems applying the trapezoidal rule are included to evaluate definite integrals numerically.
The document discusses the Method of Frobenius for solving ordinary differential equations (ODEs) with singular points. It states that the solution for such an ODE is given as an infinite series involving powers of x. To determine the coefficients in the series, one substitutes the series solution into the original ODE, equates coefficients of like powers of x, and obtains the indical equation. Solving this indical equation gives the indicial solution and recurrence relations for the coefficients.
The velocity of a vector function is the absolute value of its tangent vector. The speed of a vector function is the length of its velocity vector, and the arc length (distance traveled) is the integral of speed.
This document discusses first order differential equations. It defines differential equations and classifies them as ordinary or partial based on whether they involve derivatives with respect to a single or multiple variables. First order differential equations are classified into four types: variable separable, homogeneous, linear, and exact. The document provides examples of each type and explains their general forms and solution methods like separating variables, making substitutions, and integrating.
This document defines Sturm-Liouville boundary value problems (SL-BVPs) and Sturm-Liouville eigenvalue problems (SL-EVPs). It discusses regular, singular, and periodic SL-BVPs. Two examples are presented in detail: one with separated boundary conditions and one with periodic boundary conditions. Properties of regular and periodic SL-BVPs are discussed, including that eigenvalues are real and eigenfunctions corresponding to distinct eigenvalues are orthogonal with respect to the weight function. The document proves several properties and establishes that regular SL-BVPs have an infinite sequence of eigenvalues.
First order linear differential equationNofal Umair
1. A differential equation relates an unknown function and its derivatives, and can be ordinary (involving one variable) or partial (involving partial derivatives).
2. Linear differential equations have dependent variables and derivatives that are of degree one, and coefficients that do not depend on the dependent variable.
3. Common methods for solving first-order linear differential equations include separation of variables, homogeneous equations, and exact equations.
The document presents information about differential equations including:
- A definition of a differential equation as an equation containing the derivative of one or more variables.
- Classification of differential equations by type (ordinary vs. partial), order, and linearity.
- Methods for solving different types of differential equations such as variable separable form, homogeneous equations, exact equations, and linear equations.
- An example problem demonstrating how to use the cooling rate formula to calculate the time of death based on measured body temperatures.
This document discusses differential equations and their solutions. It defines differential equations as equations involving derivatives. It notes that solutions can be general, containing an arbitrary constant, or particular, containing an initial value. Examples are given of separating variables and integrating to find the general solution to first order differential equations.
This document outlines the 7 steps for sketching the curve of a function: 1) Determine the domain, 2) Find critical points, 3) Determine graph direction and max/min, 4) Use the second derivative to find concavity and points of inflection, 5) Find asymptotes, 6) Find intercepts and important points, 7) Combine evidence to graph the function. Key tests are outlined for max/min, concavity, and points of inflection using the first and second derivatives.
The document provides an introduction to partial differential equations (PDEs). Some key points:
- PDEs involve functions of two or more independent variables, and arise in physics/engineering problems.
- PDEs contain partial derivatives with respect to two or more independent variables. Examples of common PDEs are given, including the Laplace, wave, and heat equations.
- The order of a PDE is defined as the order of the highest derivative. Methods for solving PDEs through direct integration and using Lagrange's method are briefly outlined.
critical points/ stationary points , turning points,Increasing, decreasing functions, absolute maxima & Minima, Local Maxima & Minima , convex upward & convex downward - first & second derivative tests.
This document discusses the Laplace transform of periodic functions. It begins by defining a periodic function f(t) and derives the Laplace transform of f(t) as an infinite sum. Several examples are then worked through to demonstrate finding the Laplace transform of square waves, triangular waves, and other periodic functions. Transform properties and techniques like using gate functions are employed in the examples. Reference books on circuit analysis and Laplace transforms are also listed.
Gamma Function mathematics and history.
Please send comments and suggestions for improvements to solo.hermelin@gmail.com. Thanks.
More presentations on different subjects can be found on my website at http://www.solohermelin.com.
Numerical Solutions of Burgers' Equation Project ReportShikhar Agarwal
This report summarizes the use of finite element methods to numerically solve Burgers' equation. It introduces finite element methods and the Galerkin method for approximating solutions. MATLAB codes are presented to solve example boundary value problems and differential equations. The method of quasi-linearization is also described for solving Burgers' equation numerically. The report concludes that finite element methods can accurately predict numerical solutions that are close to exact solutions for problems where no closed-form solution exists.
EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...cscpconf
In this paper, based on the definition of conformable fractional derivative, the functional
variable method (FVM) is proposed to seek the exact traveling wave solutions of two higherdimensional
space-time fractional KdV-type equations in mathematical physics, namely the
(3+1)-dimensional space–time fractional Zakharov-Kuznetsov (ZK) equation and the (2+1)-
dimensional space–time fractional Generalized Zakharov-Kuznetsov-Benjamin-Bona-Mahony
(GZK-BBM) equation. Some new solutions are procured and depicted. These solutions, which
contain kink-shaped, singular kink, bell-shaped soliton, singular soliton and periodic wave
solutions, have many potential applications in mathematical physics and engineering. The
simplicity and reliability of the proposed method is verified.
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...ieijjournal
In this paper, we study the numerical solution of singularly perturbed parabolic convection-diffusion type
with boundary layers at the right side. To solve this problem, the backward-Euler with Richardson
extrapolation method is applied on the time direction and the fitted operator finite difference method on the
spatial direction is used, on the uniform grids. The stability and consistency of the method were established
very well to guarantee the convergence of the method. Numerical experimentation is carried out on model
examples, and the results are presented both in tables and graphs. Further, the present method gives a more
accurate solution than some existing methods reported in the literature.
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...ieijjournal
In this paper, we study the numerical solution of singularly perturbed parabolic convection-diffusion type
with boundary layers at the right side. To solve this problem, the backward-Euler with Richardson
extrapolation method is applied on the time direction and the fitted operator finite difference method on the
spatial direction is used, on the uniform grids. The stability and consistency of the method were established
very well to guarantee the convergence of the method. Numerical experimentation is carried out on model
examples, and the results are presented both in tables and graphs. Further, the present method gives a more
accurate solution than some existing methods reported in the literature.
IRJET- Wavelet based Galerkin Method for the Numerical Solution of One Dimens...IRJET Journal
This document presents a wavelet-based Galerkin method for numerically solving one-dimensional partial differential equations using Hermite wavelets. Hermite wavelets are used as the basis functions in the Galerkin method. The method is demonstrated on some test problems, and the numerical results obtained from the proposed method are compared to exact solutions and a finite difference method to evaluate the accuracy and efficiency of the proposed wavelet Galerkin approach.
Stochastic differential equations (SDEs) describe systems with random components. Common methods to solve SDEs include spectral and perturbation methods. The spectral method represents variables and parameters as mean values plus fluctuations. Taking the expected value of the SDE yields equations for the mean and fluctuations that can be solved. The perturbation method expresses variables and parameters as power series expansions. Introducing these into the SDE allows analytical or numerical solution. SDEs are used to model systems with uncertain parameters like groundwater flow with random hydraulic conductivity.
Numerical disperison analysis of sympletic and adi schemexingangahu
This document discusses numerical dispersion analysis of symplectic and alternating direction implicit (ADI) schemes for computational electromagnetic simulation. It presents Maxwell's equations as a Hamiltonian system that can be written as symplectic or ADI schemes by approximating the time evolution operator. Three high order spatial difference approximations - high order staggered difference, compact finite difference, and scaling function approximations - are analyzed to reduce numerical dispersion when combined with the symplectic and ADI schemes. The document derives unified dispersion relationships for the symplectic and ADI schemes with different spatial difference approximations, which can be used as a reference for simulating large scale electromagnetic problems.
Numerical Solution of Diffusion Equation by Finite Difference Methodiosrjce
IOSR Journal of Mathematics(IOSR-JM) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of mathemetics and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in mathematics. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
This document presents a numerical approach to solving ordinary differential equations. It discusses solving boundary value problems by converting them to initial value problems using the shooting method. It describes solving the initial value problems using the Runge-Kutta method. It provides examples of applying these methods to solve various second order differential equations. The conclusion discusses solving linear and nonlinear differential equations with numerical methods. The future scope section proposes extensions like solving other boundary condition types, performing error and stability analysis, and applying the methods to nonlinear problems.
This document discusses stability estimates for identifying point sources using measurements from the Helmholtz equation. It begins by introducing the inverse problem of determining source terms from boundary measurements of the electromagnetic field. It then proves identifiability, showing that a single boundary measurement can uniquely determine the sources. Next, it establishes a local Lipschitz stability result, demonstrating continuous dependence of the sources on the measurements. Finally, it proposes a numerical inversion algorithm using a reciprocity gap concept to quickly and stably identify multiple sources.
least squares approach in finite element methodsabiha khathun
1) The document discusses deriving finite element equations using the weighted residual method - least squares approach. It describes the general process of discretizing the domain into finite elements, assuming a trial solution, and minimizing the residual over the domain to obtain equations.
2) It provides an example of using the least squares method to find the solution to a differential equation subject to boundary conditions. The approximate solution is assumed, the residual is calculated, and the constants in the solution are evaluated by minimizing the integral of the squared residual.
3) The least squares method leads to a system of equations that can be solved to determine the constants in the approximate solution. This provides a way to derive finite element equations for the given differential equation
This document presents an application of the differential transform method to solve nonlinear differential equations. The differential transform method can decompose nonlinear terms in a differential equation into a power series, allowing iterative calculation of the solution coefficients. Three examples are provided to demonstrate solving first-order nonlinear differential equations using this method. The power series solutions converged rapidly to the exact solutions. The differential transform method is concluded to be a useful technique for solving both linear and nonlinear differential equations.
This document presents an application of the differential transform method to solve nonlinear differential equations. The differential transform method can decompose nonlinear terms in a differential equation into a power series, allowing iterative calculation of the solution coefficients. Three examples are provided to demonstrate solving first-order nonlinear differential equations using this method. The power series solutions converged rapidly to the exact solutions. The differential transform method is concluded to be a useful technique for solving both linear and nonlinear differential equations.
This document presents three methods for numerically solving linear Volterra-Fredholm integro-differential equations (LVFIDEs) of the first order: original Lagrange polynomial method, barycentric Lagrange polynomial method, and modified Lagrange polynomial method. It derives the equations for approximating the solution using each method. The document also provides algorithms to implement each method. It includes some test examples and their numerical solutions to validate the accuracy of the techniques.
The document proposes a new method for approximating matrix finite impulse response (FIR) filters using lower order infinite impulse response (IIR) filters. The method is based on approximating descriptor systems and requires only standard linear algebraic routines. Both optimal and suboptimal cases are addressed in a unified treatment. The solution is derived using only the Markov parameters of the FIR filter and can be expressed in state-space or transfer function form. The effectiveness of the method is illustrated with a numerical example and additional applications are discussed.
CFD (computational fluid dynamics) involves identifying a problem, choosing governing equations, discretizing the domain, solving algebraic equations, and post-processing results. PDEs are classified as elliptic, parabolic, or hyperbolic based on characteristics. Well-posed problems have solutions that are unique and depend continuously on initial/boundary conditions. Characteristics of hyperbolic PDEs allow discontinuities, while elliptic/parabolic PDEs have smooth solutions.
This document discusses various numerical analysis methods for solving differential and partial differential equations. It begins with a brief history of numerical analysis, then discusses different interpolation methods like Lagrangian interpolation. It also covers finite difference methods, finite element methods, spectral methods, and the method of lines - explaining how each method discretizes equations. The document concludes by discussing multigrid methods, which use a hierarchy of grids to accelerate convergence in solving equations.
This document presents an internship project report on multistep methods for solving initial value problems of ordinary differential equations. It introduces the basic problem of finding the function y(t) that satisfies a given differential equation and initial condition. It discusses existence and uniqueness theorems, Picard's method of successive approximations, and approaches for approximating the required integrations, including the derivative, Taylor series, and Euler's methods. The report appears to evaluate various one-step and multistep numerical methods for solving initial value problems, including Runge-Kutta, Adams-Bashforth, and Adams-Moulton methods.
Some Engg. Applications of Matrices and Partial DerivativesSanjaySingh011996
This document contains a submission by three students to Dr. Sona Raj Mam regarding partial differentiation, matrices and determinants, and eigenvectors and eigenvalues. It provides examples of how these mathematical concepts are applied in fields like engineering. Partial differentiation is used in economics to analyze demand and in image processing for edge detection. Matrices and determinants allow representing linear transformations in graphics software. Eigenvalues and eigenvectors have applications in areas like computer science, smartphone apps, and modeling structures in civil engineering. The document also provides real-world examples and references textbooks and websites for further information.
Similar to Spectral methods for solving differential equations (20)
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
Physiology and chemistry of skin and pigmentation, hairs, scalp, lips and nail, Cleansing cream, Lotions, Face powders, Face packs, Lipsticks, Bath products, soaps and baby product,
Preparation and standardization of the following : Tonic, Bleaches, Dentifrices and Mouth washes & Tooth Pastes, Cosmetics for Nails.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
South African Journal of Science: Writing with integrity workshop (2024)
Spectral methods for solving differential equations
1. PROJECT REPORT
IAS-NASI-INSA
Summer Research Fellowship Programme 2014
Spectral methods for solving Differential
Equations
Rajesh Aggarwal
Faculty of Engineering and Technology
Gurukula Kangri Vishwavidyalaya Haridwar
Under the guidance of
Dr. Pravin Kumar Gupta
Department of Earth Sciences
Indian Institute of Technology, Roorkee
Uttarakhand
2. NAME OF SRF: Rajesh Aggarwal
REGISTRATION NUMBER: MATS605
INSTITUTE WHERE WORKING: Indian Institute of
Technology, Roorkee
DATE OF JOINING THE PROJECT: 11/06/2014
DATE OF COMPLETION OF THE PROJECT: 06/08/2014
NAME OF THE GUIDE: Dr. Pravin Kr. Gupta
PROJECT TITLE: Spectral methods for
solving Differential
equations
Dr. Pravin Kumar Gupta Rajesh Aggarwal
Department of Earth Sciences MATS605
Indian Institute of Technology Date:06/08/2014
Roorkee, Uttarakhand
Date: 06/08/2014
3. Dr. Pravin Kumar Gupta
Department of Earth Sciences,
Indian Institute of Technology
Roorkee, Uttarakhand
E-mail: pkgptfes@iitr.ernet.in
CERTIFICATE
This is to certify that the project entitled “Spectral methods for solving
Differential Equations” is a bonafide work carried out by Rajesh
Aggarwal, Second Year B.Tech in Electrical Engineering , Faculty of
Engineering and Technology, Gurukula Kangri Vishwavidyalaya,
Haridwar at Indian Institute of Technology, Roorkee under my guidance,
during the period of 11th
June 2014 to 06th
August 2014.
(Dr. Pravin Kumar Gupta)
4. Acknowledgement
I would like to thank Dr. Pravin Kumar Gupta for the continuous guidance
and patience. Being my 1st
summer project I had lot of things to learn and
the amount of knowledge and experience I have gained from him is
matchless.
I owe my sincere thanks to him.
I thank Mr. Rahul Dehiya for his guidance and overall for making it a
great learning experience.
I also thank IAS-NASI-INSA for their support throughout the programme
and for giving me this great opportunity. It would have not been possible
without this programme.
Rajesh Aggarwal
5. Table of Contents
1. Introduction...................................................................... 6
1.1. Analytical methods for solving Differential Equation (D.E.)
……………………………………………………………….……..………7
1.2. Numerical Methods……………………………………………....8
1.2.1. Conventional finite difference method (CFDM)…...……8
1.2.2. Spectral finite difference method (SFDM)…………………9
2. Methods ........................................................................ 10
2.1. Methods for solving D.E by CFDM…………….……………11
2.1.1. Matlab code for solving D.E by CFDM………………………12
2.2. Methods for solving D.E. by SFDM…………………………14
2.2.1. Matlab code for solving D.E by SFDM………………………15
2.2.2. Matlab code for function interpolant_raj………………..16
2.3. Solving Problem on Half-space with different number of grid
points …………………………………………………………………..18
2.3.1. Conventional finite difference method…………………....18
2.3.1.1. Matlab code for CFDM………………………………………18
2.3.2. Spectral finite difference method………………….….………20
2.3.2.1. Matlab code for SFDM…………………………….…………20
2.3.2.2. Matlab code for function points_raj_finite………..23
2.3.2.3. Matlab code for function earths_k…………………….24
2.4. Layered earth Problem……………………...………….………25
2.4.1. Conventional finite difference method………….….……..25
2.4.1.1. Matlab code for CFDM………………………….…………..25
2.4.2. Spectral finite difference method…………………..…………27
2.4.2.1. Matlab code for SFDM…………………………..…………..27
3. Conclusion………….......................................................….30
4. References..................................................................... 32
7. 7
1.1. Analytical methods for solving differential equations:
Analytical solutions are exact solutions of differential equations.
It satisfies differential equations and boundary conditions.
For example: For specific problem of Newton laws of cooling we have differential
equations associated with it as:
2 25
dy
y
dt
With initial condition 0 40y
This problem can be easily solved analytically and give exact results having solution
as:
1
2
(25 )
dy
dt y
=> 2 ,
(25 )
dy
dt
y
=> 2 ,
(25 )
dy
dt
y
=> 0( 1)ln 25 2y t C
=> ln 25 2y t C
=> 2 2
25 t C t C
y e e e
=> 2
25 C t
y e e
=> 2 2
25 25 ,C t t
y e e Ae
On putting initial conditions we get
2
25 15 t
y e
But all real physical system do not provide such simple differential equation
And it is tough task to solve complicated differential equations with analytical methods.
So, we need another methods that can be used to solve differential equations
associated with physical system.
8. 8
1.2. Numerical Methods:
Numerical methods provide numerical approximation to the solutions of differential
equations.
Numerical methods do not provide exact solutions of differential equations. They give
approximation to the results.
We will deal with finite difference method methods for solving differential equations:
(1). Conventional finite difference method (CFDM)
(2). Spectral finite difference method (SFDM)
1.2.1. Conventional finite difference method:
In conventional finite difference method we convert our differential equation to
difference equation and then solve it to get our desired result.
Differential equations can be converted to difference equation by replacing first and
second prime by respective difference formula.
The derivative of a function f at a point x is defined by the limit
0
( ) ( )
( ) lim
h
f x h f x
f x
h
And, double derivative of a function f at a point x is defined by the limit
20
( ) 2 ( ) ( )
( ) lim
h
f x h f x f x h
f x
h
The above two formula can be derived by considering Taylor series of function f.
2( ) ( )
( ) ( ) ( )
1! 2!
f a f a
f a h f a h h O h
Where ( )O h denotes higher order terms or by simply neglecting all higher order terms
we can write
( )
( ) ( )
1!
f a
f a h f a h
Or,
( ) ( )
( )
f a h f a
f a
h
9. 9
1.2.2 Spectral finite difference methods:
When data are smooth Spectral finite difference methods can be used to solve
ordinary differential equations and partial differential equations with high accuracy in
simple domain.
Spectral finite difference methods can achieve high accuracy then conventional finite
difference methods (spectral finite difference methods can achieve accuracy up to ten
digits while finite difference can up to 2 digits with the same number of grid points).
In spectral finite difference methods we write the differential equations as the sum of
basic functions and find there coefficient such that the resultant function can satisfy
the differential equations.
For example: To solve any differential equation we can take a function
( ) ( )n n
n
f x a x
Such that ( )f x satisfy ( )j jf x u
Where ju is corresponding value of function at jx
Here we are free to choose ( )n x , ( )n x can be either
(i) trigonometric,
(ii) exponentials or
(iii) Simple combinations of polynomials.
11. 11
2.1. Methods for solving differential equations by CFDM:
Let the given differential equation be:
2
2
2
0
d y
k y
dx
………………………….. <01>
With boundary conditions (0) 1y & (1) k
y e and k=1
To solve this equation by conventional finite difference method we need to convert this
differential equations to difference equations using:
0
( ) ( )
( ) lim
h
f x h f x
f x
h
, And
20
( ) 2 ( ) ( )
( ) lim
h
f x h f x f x h
f x
h
Or say 1 1
2
2
( ) i i i
i
y y y
y x
h
where 1 1( )i iy y x (value of y at 1ix ), ix denotes the grid
points where we have to evaluate the value of differential equation and denotes space
between these grid points.
Then our differential equation will become:
=> 21 1
2
2
0i i i
i
y y y
k y
h
Or, 2 2
1 1(2 ) 0i i iy k h y y --------------------- <02>
Let we have to solve this differential equation in interval [0, 1], here we can discretise
our data in as many interval we want by choosing appropriate value of h .
And get points as ix ih where i =0, 1, 2, ………
Let h =0.25 then from equation 02 we get set of algebraic equations as:
2 2
2 1 0(2 (0.25) ) 0y k y y
2 2
3 2 1(2 (0.25) ) 0y k y y
2 2
4 3 2(2 (0.25) ) 0y k y y
2 2
5 4 3(2 (0.25) ) 0y k y y
Now writing these set of equations in matrix form as:
Ay B
And then after putting boundary conditions and solving the matrix equation for y we
get our desired result.
12. 12
2.1.1 Matlab codes for solving this differential equations
clc; clear;
A=input('enter lower limit');
B=input('enter upper limit');
h=input('enter value of h');
K=input('enter value of k');
P=(B-A)/h+1;
for i=0:P-1
Q(i+1)=A+i*h;
end
for i=1:P+1;
E(i,i)=1;
E(i,i+1)=-2;
E(i,i+2)=1;
end
E=E./(h^2);
E=E(1:P,2:P+1);
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
% solving differential equation starts here
R=E; I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K^2).*I(k,k);
end
m=R-L;
j=1; p=P;
y(j)=a; y(p)=b; e=zeros(1,P);
c=zeros(1,P); d=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1);
c=c';
q=m;
q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
plot (Q,abs(O));
13. 13
Table 1: solution of differential equations 2
2
2
0
d y
k y
dx
by CFDM
Graph 1: Solution of given differential equation by conventional finite difference
method
x Calculated
y
Exact y Error
0 1.0000 1.0000 0
0.25 1.2847 1.2840 0.0006803
0.50 1.6497 1.6487 0.0009844
0.75 2.1178 2.1170 0.0008121
1.0 2.7183 2.7183 0
0
0.5
1
1.5
2
2.5
3
0 0.2 0.4 0.6 0.8 1 1.2
y-value
x-value
solution of
14. 14
2.2. Methods for solving differential equations by SFDM:
WE can solve the same problem by spectral finite difference methods:
Our differential equation is:
2
2
2
0
d y
k y
dx
………………………….. <01>
With boundary conditions (0) 1y & (1) k
y e and k=1
To solve the given equation by spectral finite difference methods we have to choose
an interpolant ( ) ( )i iy x L x y such that it satisfy the differential equation.
Then we can write ( ) ( )i iy x L x y and ( ) ( )i iy x L x y
Now on putting value of ( )y x and ( )y x in equation (01) we get a matrix in form:
Ay B .
And then after putting boundary conditions and solving the matrix equation for y we
get our desired result.
15. 15
2.2.1 Matlab codes for solving this differential equations by SFDM:
clc; clear;
A=input('enter lower limit');
B=input('enter upper limit');
h=input('enter value of h');
K=input('enter value of k');
P=(B-A)/h+1;
for i=0:P-1
Q(i+1)=A+i*h;
end
E=interpolant_raj(Q); % this function provides D-matrix
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
% solving differential equation starts here
R=E^(2); I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K^2).*I(k,k);
end
m=R-L;
j=1; p=P;
y(j)=a; y(p)=b; e=zeros(1,P);
c=zeros(1,P); d=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1);
c=c';
q=m;
q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
plot (Q,O);
16. 16
2.2.2 Matlab code for function interpolant_raj.
function E=interpolant_raj(T) % T is vector containing points where we
have to interpolate
% E is D matrix
x=T; s=x;
[~, n]=size(x);
A=zeros(1,n); D=zeros(1,n);
B=ones(1,n); E=zeros(n,n);
k=1;
for j=1:n
for i=1:n
if i~=j
A(k)=A(k)+1/(s(j)-x(i));
B(k)=B(k).*(s(j)-x(i));
D(k)=B(k).*A(k);
E(k,k)=A(k);
end
end
k=k+1;
end
G=ones(n,n); k=1;
if n>2
for j=1:n
l=1:n;
l(:,j)=[];
m=1;
for v=1:n-1
z=l(v);
for i=1:n
if i~=j && i~=z
G(k,m)=G(k,m).*(s(j)-x(i));
E(k,z)=G(k,m)./B(z);
end
end
m=m+1;
end
k=k+1;
end
else
for j=1:n
l=1:n;
l(:,j)=[];
m=1;
for v=1:n-1
z=l(v);
for i=1:n
E(k,z)=G(k,m)./B(z);
end
m=m+1;
end
k=k+1;
end
end
17. 17
Table 2: solution of differential equations 2
2
2
0
d y
k y
dx
by SFDM
Graph 2: Solution of given differential equation by SFDM
X Calculated y Exact y Error
0
1.000000000000000 1.000000000000000 0
0.25
1.283972703420206 1.284025416687741
0.00005271
0.50
1.648733207743882 1.648721270700128
-0.00001193
0.75
2.117079044491258 2.117000016612675
-0.00007902
1.0
2.718281828459046 2.718281828459046
0
0
0.5
1
1.5
2
2.5
3
0 0.2 0.4 0.6 0.8 1 1.2
y-values
x-values
Solution of D.E.
18. 18
2.3. Solving Problem on Half-space with different number of grid
points and comparing results:
Let our differential equation be
2
2
2
0
d E
k E
dx
this differential equation is arises due
to decay of electric field when it pass through earth surface of different conductivity.
Here 2
k j where = earth conductivity, = Permeability having value,
= 7
4 10
and = angular frequency.
2.3.1. Conventional finite difference method:
For solving this differential equation by conventional finite difference method we will
first need to discretise the interval [0, 3000] into number of subinterval. Let h be gap
between two consecutive subintervals and N denotes number of subintervals.
2.3.1.1 Matlab code to check what happens when we increase number of grid
points (N) in CFDM.
Clc
clear
n=input('enter number of earth layer');
H=zeros(1,n); N=zeros(1,n);
for i=1:n
H(i)=input('Enter Depth of layers');
end
M=input('enter frequency');
M=M*8*(pi)^2*(1e-07);
S=zeros(1,n);
for i=1:n
S(i)=input('Enter sigma for each layer');
end
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
%h=input('enter h');
for N=3:3:30
h=H/N ;
[Q P]=points_raj_finite(n,h,H,N);
K=earths_k(n,M,S,N,Q,P);
for i=1:P+1;
E(i,i)=1;
E(i,i+1)=-2;
E(i,i+2)=1;
end
E=E./(h^2);
19. 19
E=E(1:P,2:P+1);
% solving differential equation starts here
R=E; I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K(k)).*I(k,k);
end
m=R+(L*1i);
j=1; p=P;
y(j)=a; y(p)=b; e=zeros(1,P);
c=zeros(1,P); d=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1);
c=c';
q=m;
q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
T=(exp(1i*Q*(K(1)*1i)^(1/2)));
J=abs(T);
error = norm(J-abs(O),inf);
loglog(N,error,'marker','*');
hold on
end
grid on, xlabel N, ylabel error
title('Convergence of conventional finite difference method')
For:
Number of earth layer,(n)=1
Depth of layer=3000
Frequency=1
Sigma=1
Enter boundary conditions
Initial condition (0)E =1
Final condition (3000)E =0
20. 20
Graph 3: Variation in error as we increase number of grid points in conventional finite
difference method
2.3.2. Spectral finite difference method:
For solving this differential equation by spectral finite difference method we will first
discretise the interval [0, 3000] into number of subinterval. Let h be gap between two
consecutive subintervals and N denotes number of subintervals.
2.3.2.1 Matlab code to check what happens when we increase number of grid
points (N) in SFDM.
Clc
clear
n=input('enter number of earth layer');
H=zeros(1,n); N=zeros(1,n);
for i=1:n
H(i)=input('Enter Depth of layers');
end
M=input('enter frequency');
M=M*8*(pi)^2*(1e-07);
S=zeros(1,n);
for i=1:n
S(i)=input('Enter sigma for each layer');
21. 21
end
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
%h=input('enter h');
for N=3:3:30
h=H/N ;
[Q P]=points_raj_finite(n,h,H,N);
K=earths_k(n,M,S,N,Q,P);
E=interpolant_raj(Q);
% solving differential equation starts here
R=E^2; I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K(k)).*I(k,k);
end
m=R+(L*1i);
j=1; p=P;
y(j)=a; y(p)=b; e=zeros(1,P);
c=zeros(1,P); d=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1);
c=c';
q=m;
q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
T=(exp(1i*Q*(K(1)*1i)^(1/2)));
J=abs(T);
error = norm(J-abs(O),inf);
loglog(N,error,'marker','*');
hold on
end
grid on, xlabel N, ylabel error
title('Convergence of spectral finite difference method')
22. 22
For:
Number of earth layer,(n)=1
Depth of layer=3000
Frequency=1
Sigma=1
Enter boundary conditions
Initial condition (0)E =1
Final condition (3000)E =0
Graph 4: Variation in error as we increase number of grid points in SFDM
23. 23
2.3.2.2 Matlab code for function points_raj_finite(n,h,H,N):
function [Q P]=points_raj_finite(n,h,H,N)
% n is scalar having number of earth layer
% H is vector containing Depth of each layers from the end of last one
% N is vector containing number of points we want to calculate in each
% layer
% Q is vector containing coordinate of interpolated points
% P is scalar having total number of points
y=zeros(n,N(n));
for i=1:N(1)
y(1,i)=i*h;
end
for i=1:(n-1)
a=0;
for l=1:i
a=a+H(l);
end
for k=1:N(i+1)+1
y(i+1,k)=a+(k)*h;
end
end
P=sum(N)+1; k=2; Q(1)=0;
for j=1:n
for i=1:N(j)
Q(k)=y(j,i);
k=k+1;
end
end
24. 24
2.3.2.3 Matlab code for function earths_k:
function K=earths_k(n,M,S,N,Q,P)
j=1;K=zeros(1,P);
% N is vector containing number of points we want to calculate in each
% layer
% n is scalar having number of earth layer
% Q is vector containing coordinate of interpolated points
% P is scalar having total number of points
% K is vector having value of K for each corresponding points in Q
% M Define (i*w*miu) here (scalar product of j,omega,miu)
% S define sigma (vector(1,n) sigma for different layer)
for i=1:N(1)
K(i)=M*S(j);
end
h=N(1); a=2;
for j=1:n-1
v=h+a;
h=h+N(j+1);
for i=v:h
K(i)=M*S(j+1);
end
end
a=1;
for j=1:n-1
K(N(j)+a)=M*((S(j)*(Q(N(j)+a)-Q(N(j)+a-1))+S(j+1)*(Q(N(j)+a+1)-
Q(N(j)+a)))/(Q(N(j)+a)-Q(N(j)+a-1)+Q(N(j)+a+1)-Q(N(j)+a)));
a=a+N(j);
end
Comparison of error of CFDM and SFDM:
From Graph 3 and Graph 4 we can conclude that Spectral finite difference method
provide error of approx. 3
10
with only 9 grid points while conventional finite difference
method with 20 grid points and more.
25. 25
2.4. Layered earth Problem:
Solving nonlinear differential equations arises due to Layered earth of different
conductivity by numerical methods:
Let us consider one example to understand this method.
Let our differential equation be
2
2
2
0
d E
k E
dx
this differential equation is arises due to
decay of electric field when it pass through earth surface of different conductivity.
Here 2
k j where = earth conductivity, = Permeability, having value
= 7
4 10
and = angular frequency
In this differential equation since for different earth layer is different or say is
function of x therefore 2
k will be function of x .
We will solve this differential equation by conventional finite difference method and
spectral finite difference method and compare the results.
2.4.1. Conventional finite difference method:
For solving this differential equation by conventional finite difference method we will
first need to discretise the interval [0, 3000] into number of subinterval. Let h be gap
between two consecutive subintervals and N denotes number of subintervals.
2.4.1.1 Matlab code for solving this differential equation by CFDM:
clc
clear
n=input('enter number of earth layer');
H=zeros(1,n); N=zeros(1,n);
h=input('enter h');
for i=1:n
H(i)=input('Enter Depth of layers');
N(i)=H(i)/h ;
end
[Q P]=points_raj_finite(n,h,H,N);
M=input('enter frequency');
M=M*8*(pi)^2*(1e-07);
S=zeros(1,n);
for i=1:n
S(i)=input('Enter sigma for each layer');
end
K=earths_k(n,M,S,N,Q,P);
for i=1:P+1;
E(i,i)=1;
26. 26
E(i,i+1)=-2;
E(i,i+2)=1;
end
E=E./(h^2);
E=E(1:P,2:P+1);
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
% solving differential equation starts here
R=E; I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K(k)).*I(k,k);
end
m=R+(L*1i);
j=1; p=P;
y(j)=a; y(p)=b; e=zeros(1,P);
c=zeros(1,P); d=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1);
c=c';
q=m;
q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
plot (Q,abs(O),'marker','*');
grid on, xlabel Depth-from-earth, ylabel Electric-field
title(['Calulation using finite difference D-Matrix for h=',num2str(h)])
27. 27
2.4.2. Spectral finite difference method:
For solving this differential equation by Spectral finite difference method we will first
need to discretise the interval [0, 3000] into number of subinterval. Let h be gap
between two consecutive subintervals and N denotes number of subintervals.
2.4.2.1 Matlab code for solving this differential equation by SFDM:
Clc; clear;
n=input('enter number of earth layer');
H=zeros(1,n); N=zeros(1,n);
h=input('enter h');
for i=1:n
H(i)=input('Enter Depth of layers');
N(i)=H(i)/h ;
end
[Q P]=points_raj_finite(n,h,H,N);
M=input('enter frequency');
M=M*8*(pi)^2*(1e-07); S=zeros(1,n);
for i=1:n
S(i)=input('Enter sigma for each layer');
end
K=earths_k(n,M,S,N,Q,P);
E=interpolant_raj(Q);
disp('Enter boundary conditions');
a=input('Enter initial condition');
b=input('Enter final condition');
% solving differential equation starts here
R=E^2; I=eye(P);L=zeros(P,P);
for k=1:P
L(k,k)=(K(k)).*I(k,k);
end
m=R+(L*1i);
j=1; p=P; c=zeros(1,P); d=zeros(1,P); y(j)=a; y(p)=b; e=zeros(1,P);
for i=1:P;
e(i)=-1*(m(i,j)*y(j));
end
for i=1:P;
d(i)=-1*(m(i,p)*y(p));
end
for i=1:P;
c(i)=e(i)+d(i);
end
c=c(2:P-1); c=c'; q=m; q=q(2:P-1,2:P-1);
l=qc; O=zeros(1,P);
for i=1:P
if i==1
O(1)=y(j);
elseif i==P
O(P)=y(p);
else
O(i)=l(i-1);
end
end
plot (Q,abs(O),'marker','*');
grid on, xlabel Depth-from-earth, ylabel Electric-field
title(['Calulation using Spectral finite difference method D-Matrix for
h=',num2str(h)])
31. 31
[01]. All differential equations associated with real physical problems are not easily
solved with analytical methods so we need numerical methods to solve them.
[02]. We have compared the results of two numerical methods to solve our differential
equations:
(01). Conventional finite difference method
(02). Spectral finite difference method
[03]. Spectral finite difference methods give better results than conventional finite
difference method.
[04]. Spectral finite difference methods require less number of grid points as compared
conventional finite difference method to solve a problem with the same accuracy.
33. 33
[01] Trefethen, L.N,(2000), Spectral methods in Matlab, SIAM publication.
[02]. Abramowitz and Stegun, (1972), Handbook of Mathematical Function, National
Bureau of Standards
[03]. Gilberto E. Urroz,( 2004), Numerical Solution to Ordinary Differential Equations
[04]. http://en.wikipedia.org/wiki/Finite_difference_method
[05]. http://www.engr.sjsu.edu/trhsu/Chapter%209%20Intro%20to%20FDM.pdf
[06]. http://en.wikipedia.org/wiki/Spectral_method
[07]. http://en.wikipedia.org/wiki/Finite_difference
[08]. http://www.csc.kth.se/utbildning/kth/kurser/DN2266/matmod11/Fourier3_2p.pdf
[09]. maths-people.anu.edu.au/~mike/NQinODE.pdf
[10]. tutorial.math.lamar.edu/Classes/DE/BoundaryValueProblem.aspx
[11].http://www.cdeep.iitb.ac.in/nptel/Mechanical/Heat%20and%20Mass%20Transfer
/Conduction/Module%205/main/5.1.html
[12]. en.wikipedia.org/wiki/Differential_equation
[13].https://www.whitman.edu/mathematics/multivariable/multivariable_17_Differentia
l_Equations.pdf
[14]. F. N. van de Vosse P. D. Minev ,Spectral element methods: theory and
applications (w3.pppl.gov/m3d/reference/se5_nov_28_07.pdf)
[15]. Katarina Gustavsson, Spectral differentiation
(www.math.nus.edu.sg/~matgkv/Lecture5.pdf)
[16]. A.N. Malyshev,On the spectral differentiation
(www.ii.uib.no/~sasha/INF263/spectral.pdf)
[17]. Lu Yixin , Introduction to Spectral conventional finite difference methods,
September 26, 2007
[18]. ms.mcmaster.ca/~bprotas/CES712a/diff_02_4.pdf