EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 8220100254147
Author: Chapra
Publisher: MCG
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 27, Problem 15P
Develop a user-friendly computer program to implement the finite-difference approach for solving a linear second-order ODE. Test it by duplicating Example 27.3.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
3. Using the trial function uh(x) = a sin(x) and weighting function wh(x) = b sin(x) find
an approximate solution to the following boundary value problems by determining the value
of coefficient a. For each one, also find the exact solution using Matlab and plot the exact
and approximate solutions. (One point each for: (i) finding a, (ii) finding the exact solution,
and (iii) plotting the solution)
a.
(U₁xx - 2 = 0
u(0) = 0
u(1) = 0
b. Modify the trial function and find an approximation for the following boundary value
problem. (Hint: you will need to add an extra term to the function to make it satisfy
the boundary conditions.)
(U₁xx - 2 = 0
u(0) = 1
u(1) = 0
For the DE: dy/dx=2x-y y(0)=2 with h=0.2, solve for y using each method below in the range of 0 <= x <= 3:
Q1) Using Matlab to employ the Euler Method (Sect 2.4)
Q2) Using Matlab to employ the Improved Euler Method (Sect 2.5
close all
clear all
% Let's program exact soln
for i=1:5
x_exact(i)=0.5*i-0.5;
y_exact(i)=-x_exact(i)-1+exp(x_exact(i));
end
plot(x_exact,y_exact,'b')
% now for Euler's
h=0.5
x_EM(1)=0;
y_EM(1)=0;
for i=2:5
x_EM(i)=x_EM(i-1)+h;
y_EM(i)=y_EM(i-1)+(h*(x_EM(i-1)+y_EM(i-1)));
end
hold on
plot (x_EM,y_EM,'r')
% Improved Euler's Method
h=0.5
x_IE(1)=0;
y_IE(1)=0;
for i=2:1:5
kA=x_IE(i-1)+y_IE(i-1);
u=y_IE(i-1)+h*kA;
x_IE(i)=x_IE(i-1)+h;
kB=x_IE(i)+u;
k=(kA+kB)/2;
y_IE(i)=y_IE(i-1)+h*k;
end
hold on
plot(x_IE,y_IE,'k')
4. Solve the 2D Laplace's equation on a square domain using finite difference method based on central
differences with error O(h2). Use four nodes in each direction.
0
(1.y)--5
(2.1) 0
Chapter 27 Solutions
EBK NUMERICAL METHODS FOR ENGINEERS
Ch. 27 - A steady-state heat balance for a rod can be...Ch. 27 - 27.2 Use the shooting method to solve Prob. 27.1....Ch. 27 - 27.3 Use the finite-difference approach with to...Ch. 27 - 27.4 Use the shooting method to solve
Ch. 27 - Solve Prob. 27.4 with the finite-difference...Ch. 27 - 27.7 Differential equations like the one solved...Ch. 27 - 27.8 Repeat Example 27.4 but for three masses....Ch. 27 - 27.9 Repeat Example 27.6, but for five interior...Ch. 27 - Use minors to expand the determinant of...Ch. 27 - 27.11 Use the power method to determine the...
Ch. 27 - 27.12 Use the power method to determine the...Ch. 27 - Develop a user-friendly computer program to...Ch. 27 - Use the program developed in Prob. 27.13 to solve...Ch. 27 - 27.15 Develop a user-friendly computer program to...Ch. 27 - Use the program developed in Prob. 27.15 to solve...Ch. 27 - 27.17 Develop a user-friendly program to solve...Ch. 27 - Develop a user-friendly program to solve for the...Ch. 27 - 27.19 Use the Excel Solver to directly solve...Ch. 27 - Use MATLAB to integrate the following pair of ODEs...Ch. 27 - The following differential equation can be used to...Ch. 27 - 27.22 Use MATLAB or Mathcad to...Ch. 27 - 27.23 Use finite differences to solve the...Ch. 27 - Solve the nondimensionalized ODE using finite...Ch. 27 - 27.25 Derive the set of differential equations for...Ch. 27 - 27.26 Consider the mass-spring system in Fig....Ch. 27 - 27.27 The following nonlinear, parasitic ODE was...Ch. 27 - A heated rod with a uniform heat source can be...Ch. 27 - 27.29 Repeat Prob. 27.28, but for the following...Ch. 27 - 27.30 Suppose that the position of a falling...Ch. 27 - Repeat Example 27.3, but insulate the left end of...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.Similar questions
- 3. Using the trial function u¹(x) = a sin(x) and weighting function w¹(x) = b sin(x) find an approximate solution to the following boundary value problems by determining the value of coefficient a. For each one, also find the exact solution using Matlab and plot the exact and approximate solutions. (One point each for: (i) finding a, (ii) finding the exact solution, and (iii) plotting the solution) a. (U₁xx -2 = 0 u(0) = 0 u(1) = 0 b. Modify the trial function and find an approximation for the following boundary value problem. (Hint: you will need to add an extra term to the function to make it satisfy the boundary conditions.) (U₁xx-2 = 0 u(0) = 1 u(1) = 0arrow_forwardCircle final answer Question: Which series helps us to derive the discretized form of the governing equations? Remember to circle final answerarrow_forwardDIna Sami h.w1: solve the following differential equation numerically using Runge-Kutta Method (4th order). Find y (0.5) when y = 2 x + y, y (0) = 1. Take h = 0.5 boiker 00arrow_forward
- Q3) Find the optimal solution by using graphical method:. Max Z = x1 + 2x2 Subject to : 2x1 + x2 < 100 X1 +x2 < 80 X1 < 40 X1, X2 2 0arrow_forwardConsider the following ODE in time (from Homework 6). Integrate in time using 4th order Runge-Kutta method. Compare this solution with the finite difference and analytical solutions from Homework 6. 4 25 u(0)=0 (a) Use At = 0.2 up to a final time t = 1.0. (b) Use At=0.1 up to a final time t = 1.0. 0 (0)=2 (c) Discuss the difference in the two solutions of parts (a) and (b). Why are they so different?arrow_forwardGiven: Time, t (s) 0 2 4 6 8 10 Position, x (m) 0 0 0.7 1.8 3.4 5.1 6.3 Using Centered-Finite Difference Method, find: find the velocities 12 14 16 7.3 8.0 8.4arrow_forward
- Find the solution for following nonlinear equation using Newton-Raphson method: f(x) = x^2+x+3"sin(x) and use -3 as the initial guess.arrow_forwardPlease answer with The Network Simplex Methodarrow_forwardWhich procedure provides a method that may be used to apply Cstigliano's second theorem?arrow_forward
- A// Use Implicit Method to solve the temperature distribution of a long thin rod with a length of 9 cm and following values: k = 0.49 cal/(s cm °C), Ax = 3 cm, and At = 0.2 s. At t=0 s, the temperature of the rod is 10°C and the boundary conditions are fixed dT (9,t) 1 °C/cm. Note that the rod for alltimes at 7(0,t) = 80°C and derivative condition dx is aluminum with C = 0.2174 cal/g °C) and p = 2.7 g/cm³. Find the temperature values on the inner grid points and the right boundary for t = 0.4 s.arrow_forwardThe natural exponential function can be expressed by . Determine e2by calculating the sum of the series for:(a) n = 5, (b) n = 15, (c) n = 25For each part create a vector n in which the first element is 0, the incrementis 1, and the last term is 5, 15, or 25. Then use element-by-element calculations to create a vector in which the elements are . Finally, use the MATLAB built-in function sum to add the terms of the series. Compare thevalues obtained in parts (a), (b), and (c) with the value of e2calculated byMATLAB.arrow_forwardVerify if the following functions are Linear or not. Support your conclusion with appropriate reason. a) F(x) = b) f(x) =rcos wtarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Principles of Heat Transfer (Activate Learning wi...Mechanical EngineeringISBN:9781305387102Author:Kreith, Frank; Manglik, Raj M.Publisher:Cengage Learning
Principles of Heat Transfer (Activate Learning wi...
Mechanical Engineering
ISBN:9781305387102
Author:Kreith, Frank; Manglik, Raj M.
Publisher:Cengage Learning
01 - What Is A Differential Equation in Calculus? Learn to Solve Ordinary Differential Equations.; Author: Math and Science;https://www.youtube.com/watch?v=K80YEHQpx9g;License: Standard YouTube License, CC-BY
Higher Order Differential Equation with constant coefficient (GATE) (Part 1) l GATE 2018; Author: GATE Lectures by Dishank;https://www.youtube.com/watch?v=ODxP7BbqAjA;License: Standard YouTube License, CC-BY
Solution of Differential Equations and Initial Value Problems; Author: Jefril Amboy;https://www.youtube.com/watch?v=Q68sk7XS-dc;License: Standard YouTube License, CC-BY