Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
5th Edition
ISBN: 9780321816252
Author: C. Henry Edwards, David E. Penney, David Calvis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 7.4, Problem 40P
Program Plan Intro
Program Description: Purpose of the problem is to show that
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
We have learned the mid-point and trapezoidal rule for numercial intergration in the tutorials. Now you are asked to implement the Simpson rule, where we
approximate the integration of a non-linear curve using piecewise quadratic functions.
Assume f(x) is continuous over [a, b] . Let [a, b] be divided into N subintervals, each of length Ax, with endpoints at P = x0, x1, X2, ..., Xn,..., XN.
Each interval is Ax =
(b – a)/N.
The Simpon numerical integration rule is derived as:
N-2
Li f(x)dx =
* f(x0) + 4 (2n odd f(xn)) + 2 ( En=2,n even
N-1
f(x,) + f(xn)] .
Now complete the Python function InterageSimpson(N, a, b) below to implement this Simpson rule using the above equation.
The function to be intergrate is f (x) = 2x³ (Already defined, don't change it).
In [ ]: # Complete the function given the variables N,a,b and return the value as "TotalArea".
# Don't change the predefined content, only fill your code in the region "YOUR CODE"
from math import *
def InterageSimpson (N, a, b): # n is…
We have learned the mid-point and trapezoidal rule for
numercial intergration in the tutorials. Now you are asked to
implement the Simpson rule, where we approximate the
integration of a non-linear curve using piecewise quadratic
functions.
Assume f(x) is continuous over [a, b] . Let [a, b] be
divided into N subintervals, each of length Ax, with
endpoints at P = x0, x1, x2,..
Xn,..., XN. Each
interval is Ax = (b − a)/N.
The equation for the Simpson numerical integration rule is
derived as:
f f(x) dx
N-1
Ax [ƒ(x0) + 4 (Σ1,n odd f(xn))
ƒ(x₂)) + f(xx)].
N-2
+ 2 (n=2,n even
Now complete the Python function InterageSimpson (N, a,
b) below to implement this Simpson rule using the above
equation.
The function to be intergrate is ƒ(x) = 2x³ (Already
defined in the function, no need to change).
We have learned the mid-point and trapezoidal rule for numercial intergration in the tutorials. Now you are asked to implement the Simpson rule, where we approximate the integration of a non-linear curve using piecewise quadratic functions.
Assume f(x) is continuous over [a, b]. Let [a, b] be divided into N subintervals, each of length Ax, with endpoints at P = x0, x1,x2,..., X., XN. Each interval is Ax = (b − a)/N.
The equation for the Simpson numerical integration rule is derived as:
f f(x)dx ≈
[ƒ(x0) + 4 (EN-1,n odd S(x)) + 2 (Σ2²n even f(x)) + f(XN)].
Now complete the Python function InterageSimpson (N, a, b) below to implement this Simpson rule using the above equation.
The function to be intergrate is f(x) = 2x³ (Already defined in the function, no need to change).
*Complete the function given the variables N, a,b and return the value as "TotalArea"."
"Don't change the predefined content' only fill your code in the region *YOUR CODE""
from math import *
def InterageSimpson (N, a,…
Chapter 7 Solutions
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Ch. 7.1 - Apply the definition in (1) to find directly tile...Ch. 7.1 - Prob. 2PCh. 7.1 - Prob. 3PCh. 7.1 - Prob. 4PCh. 7.1 - Prob. 5PCh. 7.1 - Prob. 6PCh. 7.1 - Prob. 7PCh. 7.1 - Prob. 8PCh. 7.1 - Prob. 9PCh. 7.1 - Prob. 10P
Ch. 7.1 - Prob. 11PCh. 7.1 - Prob. 12PCh. 7.1 - Prob. 13PCh. 7.1 - Prob. 14PCh. 7.1 - Prob. 15PCh. 7.1 - Prob. 16PCh. 7.1 - Prob. 17PCh. 7.1 - Prob. 18PCh. 7.1 - Prob. 19PCh. 7.1 - Prob. 20PCh. 7.1 - Prob. 21PCh. 7.1 - Prob. 22PCh. 7.1 - Prob. 23PCh. 7.1 - Prob. 24PCh. 7.1 - Prob. 25PCh. 7.1 - Prob. 26PCh. 7.1 - Prob. 27PCh. 7.1 - Prob. 28PCh. 7.1 - Prob. 29PCh. 7.1 - Prob. 30PCh. 7.1 - Prob. 31PCh. 7.1 - Prob. 32PCh. 7.1 - Prob. 33PCh. 7.1 - Prob. 34PCh. 7.1 - Prob. 35PCh. 7.1 - Prob. 36PCh. 7.1 - Given a0, let f(t)=1 if 0__1a,f(t)=0 if t__a....Ch. 7.1 - Given that 0ab. Let f(t)=1 if a__tb,f(t)=0 if...Ch. 7.1 - Prob. 39PCh. 7.1 - Prob. 40PCh. 7.1 - Prob. 41PCh. 7.1 - Given constants a and b. define h(t) for t__0 by...Ch. 7.2 - Prob. 1PCh. 7.2 - Prob. 2PCh. 7.2 - Prob. 3PCh. 7.2 - Prob. 4PCh. 7.2 - Prob. 5PCh. 7.2 - Prob. 6PCh. 7.2 - Prob. 7PCh. 7.2 - Prob. 8PCh. 7.2 - Prob. 9PCh. 7.2 - Prob. 10PCh. 7.2 - Prob. 11PCh. 7.2 - Prob. 12PCh. 7.2 - Prob. 13PCh. 7.2 - Prob. 14PCh. 7.2 - Prob. 15PCh. 7.2 - Prob. 16PCh. 7.2 - Prob. 17PCh. 7.2 - Prob. 18PCh. 7.2 - Prob. 19PCh. 7.2 - Prob. 20PCh. 7.2 - Prob. 21PCh. 7.2 - Prob. 22PCh. 7.2 - Prob. 23PCh. 7.2 - Prob. 24PCh. 7.2 - Prob. 25PCh. 7.2 - Prob. 26PCh. 7.2 - Prob. 27PCh. 7.2 - Prob. 28PCh. 7.2 - Prob. 29PCh. 7.2 - Prob. 30PCh. 7.2 - Prob. 31PCh. 7.2 - Prob. 32PCh. 7.2 - Prob. 33PCh. 7.2 - Prob. 34PCh. 7.2 - Prob. 35PCh. 7.2 - Prob. 36PCh. 7.2 - Prob. 37PCh. 7.3 - Prob. 1PCh. 7.3 - Prob. 2PCh. 7.3 - Prob. 3PCh. 7.3 - Prob. 4PCh. 7.3 - Prob. 5PCh. 7.3 - Prob. 6PCh. 7.3 - Prob. 7PCh. 7.3 - Prob. 8PCh. 7.3 - Prob. 9PCh. 7.3 - Prob. 10PCh. 7.3 - Prob. 11PCh. 7.3 - Prob. 12PCh. 7.3 - Prob. 13PCh. 7.3 - Prob. 14PCh. 7.3 - Prob. 15PCh. 7.3 - Prob. 16PCh. 7.3 - Prob. 17PCh. 7.3 - Prob. 18PCh. 7.3 - Prob. 19PCh. 7.3 - Prob. 20PCh. 7.3 - Prob. 21PCh. 7.3 - Prob. 22PCh. 7.3 - Prob. 23PCh. 7.3 - Prob. 24PCh. 7.3 - Prob. 25PCh. 7.3 - Prob. 26PCh. 7.3 - Prob. 27PCh. 7.3 - Prob. 28PCh. 7.3 - Prob. 29PCh. 7.3 - Prob. 30PCh. 7.3 - Prob. 31PCh. 7.3 - Prob. 32PCh. 7.3 - Prob. 33PCh. 7.3 - Prob. 34PCh. 7.3 - Prob. 35PCh. 7.3 - Prob. 36PCh. 7.3 - Prob. 37PCh. 7.3 - Prob. 38PCh. 7.3 - Problems 39 and 40 illustrate Iwo types of...Ch. 7.3 - Problems 39 and 40 illustrate Iwo types of...Ch. 7.4 - Find the convolution f(t)g(t) in Problems 1...Ch. 7.4 - Prob. 2PCh. 7.4 - Prob. 3PCh. 7.4 - Prob. 4PCh. 7.4 - Prob. 5PCh. 7.4 - Prob. 6PCh. 7.4 - Prob. 7PCh. 7.4 - Prob. 8PCh. 7.4 - Prob. 9PCh. 7.4 - Prob. 10PCh. 7.4 - Prob. 11PCh. 7.4 - Prob. 12PCh. 7.4 - Prob. 13PCh. 7.4 - Prob. 14PCh. 7.4 - Prob. 15PCh. 7.4 - Prob. 16PCh. 7.4 - Prob. 17PCh. 7.4 - Prob. 18PCh. 7.4 - Prob. 19PCh. 7.4 - Prob. 20PCh. 7.4 - Prob. 21PCh. 7.4 - Prob. 22PCh. 7.4 - Prob. 23PCh. 7.4 - Prob. 24PCh. 7.4 - Prob. 25PCh. 7.4 - Prob. 26PCh. 7.4 - Prob. 27PCh. 7.4 - Prob. 28PCh. 7.4 - Prob. 29PCh. 7.4 - Prob. 30PCh. 7.4 - Prob. 31PCh. 7.4 - Prob. 32PCh. 7.4 - Prob. 33PCh. 7.4 - Prob. 34PCh. 7.4 - Prob. 35PCh. 7.4 - Prob. 36PCh. 7.4 - Prob. 37PCh. 7.4 - Prob. 38PCh. 7.4 - Prob. 39PCh. 7.4 - Prob. 40PCh. 7.4 - Prob. 41PCh. 7.5 - Prob. 1PCh. 7.5 - Prob. 2PCh. 7.5 - Prob. 3PCh. 7.5 - Prob. 4PCh. 7.5 - Prob. 5PCh. 7.5 - Prob. 6PCh. 7.5 - Prob. 7PCh. 7.5 - Prob. 8PCh. 7.5 - Prob. 9PCh. 7.5 - Prob. 10PCh. 7.5 - Prob. 11PCh. 7.5 - Prob. 12PCh. 7.5 - Prob. 13PCh. 7.5 - Prob. 14PCh. 7.5 - Prob. 15PCh. 7.5 - Prob. 16PCh. 7.5 - Prob. 17PCh. 7.5 - Prob. 18PCh. 7.5 - Prob. 19PCh. 7.5 - Prob. 20PCh. 7.5 - Prob. 21PCh. 7.5 - Prob. 22PCh. 7.5 - Prob. 23PCh. 7.5 - Prob. 24PCh. 7.5 - Prob. 25PCh. 7.5 - Prob. 26PCh. 7.5 - Let g(t) be the staircase function of Fig. 7.5.15....Ch. 7.5 - Suppose that f(i) is a periodic function of period...Ch. 7.5 - Suppose that f(t) is the half-wave rectification...Ch. 7.5 - Let g(t)=u(tk)f(tk), where f(t) is the function of...Ch. 7.5 - Prob. 31PCh. 7.5 - Prob. 32PCh. 7.5 - Prob. 33PCh. 7.5 - Prob. 34PCh. 7.5 - Prob. 35PCh. 7.5 - Prob. 36PCh. 7.5 - Prob. 37PCh. 7.5 - Prob. 38PCh. 7.5 - Prob. 39PCh. 7.5 - Prob. 40PCh. 7.5 - Prob. 41PCh. 7.5 - Prob. 42PCh. 7.6 - Prob. 1PCh. 7.6 - Prob. 2PCh. 7.6 - Prob. 3PCh. 7.6 - Prob. 4PCh. 7.6 - Prob. 5PCh. 7.6 - Prob. 6PCh. 7.6 - Prob. 7PCh. 7.6 - Prob. 8PCh. 7.6 - Prob. 9PCh. 7.6 - Prob. 10PCh. 7.6 - Prob. 11PCh. 7.6 - Prob. 12PCh. 7.6 - Prob. 13PCh. 7.6 - Prob. 14PCh. 7.6 - This problem deals with a mass in on a spring...Ch. 7.6 - Prob. 16PCh. 7.6 - Prob. 17PCh. 7.6 - Prob. 18PCh. 7.6 - Prob. 19PCh. 7.6 - Repeat Problem 19, except suppose that the switch...Ch. 7.6 - Prob. 21PCh. 7.6 - Prob. 22P
Knowledge Booster
Similar questions
- Consider a function f : S→ T defined by f(n) = n², where the domain is the set of consecutive integers S = {-7,..., -2, -1, 0, 1, 2, ..., 7} and the range is the set of consecutive squares T = {-64,...,-9, -4,-1,0, 1, 4, 9, ..., 64}. Which one of the following choices correct describes f? O one-to-one, but NOT onto Oonto, but NOT one-to-one O one-to-one and onto O neither one-to-one nor onto O none of thesearrow_forwardIf X~ N(3,9), find (a) Pr(2 0) (c) Pr(|X3|> 6).arrow_forwarddon not send plagiarised answer.arrow_forward
- R→ R where g(x) a) If S = {x|1 ≤ x ≤ 6}, find g(S) 12. Suppose g : b) If T = {2}, find g-¹(T) = X - [22/¹ 1 ]. List the answer for each.arrow_forwardAsequencev(x,)is bounded aboveif kER such that .A Xn 2k V, EN X, Sk V, EN .C >k V ENarrow_forwardFor f(a, b) = (a | b) | b (a) Simplify f(a, b). (b) Find DNF for f(a, b). (c) Is f(a, b) satisfiable?arrow_forward
- For the graph given, find κ(G), λ(G), and minv∈V deg(v), and determine which of the two inequal- ities in κ(G) ≤ λ(G) ≤ minv∈V deg(v) are strict.arrow_forwardConsider nonnegative integer solutions of the equation x1+x2+x3+x4+x5+x6=30. How many different solutions are there? How many solutions also satisfy: for every i∈{1,2,3,4,5,6}, xi is positive and even?arrow_forward2. Consider the given sets A and B. Show a possible bijection for the function f, where f: A-B, and define f for that bijection. a. A= {1, 2, 3, 4, ..., 10} and B = {2, 5, 10, 17, ...,101} •••. 3 b. A= {0, 1}° and B = {1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111}arrow_forward
- O POLYNOMIAL AND RATIONAL FUNCTIONS Using a graphing calculator to find local extrema of a polynomia... The polynomial function f is defined by f(x)=2x² -3x²+5x²-x-5. Use the ALEKS graphing calculator to find all the points (x, f(x)) where there is a local maximum. Round to the nearest hundredth. If there is more than one point, enter them using the "and" button. (x, f(x)) = (D and Ś 3/5arrow_forwardLet L = {aibjck | i, j, k ≥ 0 and if i = 1 then j=k}. a. Show that L is not regular using closure properties and the fact {anbn | n ≥ 0} is not regular. b. Show that L satisfies pumping lemma. [Given a pumping length p, show it satisfies all conditions of the pumping lemma for the p.] c. Explain why parts a and b do not contradict the pumping lemma for regular languages.arrow_forwardlet A = {x|x∈R and x^2-4x+3 < 0} B = {x|x∈R and 0 < x < 6} Prove that A⊂Barrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole