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
Concept explainers
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
please solve all
A particle of (mass= 4 g, charge%3 80 mC) moves in a region of space where the electric field is uniform and is given by E, =-2.5 N/C,
E = E, = 0. If the velocity of the particle at t = 0 is given by Vz =
276 m/s, v, = v, = 0, what is the speed of the particle at t = 2 s?
%3D
(in m/s)
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…
Chapter 2 Solutions
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Ch. 2.1 - Prob. 1PCh. 2.1 - Prob. 2PCh. 2.1 - Prob. 3PCh. 2.1 - Prob. 4PCh. 2.1 - Prob. 5PCh. 2.1 - Prob. 6PCh. 2.1 - Prob. 7PCh. 2.1 - Prob. 8PCh. 2.1 - Prob. 9PCh. 2.1 - Prob. 10P
Ch. 2.1 - Prob. 11PCh. 2.1 - Prob. 12PCh. 2.1 - Prob. 13PCh. 2.1 - Prob. 14PCh. 2.1 - Prob. 15PCh. 2.1 - Prob. 16PCh. 2.1 - Prob. 17PCh. 2.1 - Prob. 18PCh. 2.1 - Prob. 19PCh. 2.1 - Prob. 20PCh. 2.1 - Prob. 21PCh. 2.1 - Suppose that at time t=0, half of a logistic...Ch. 2.1 - Prob. 23PCh. 2.1 - Prob. 24PCh. 2.1 - Prob. 25PCh. 2.1 - Prob. 26PCh. 2.1 - Prob. 27PCh. 2.1 - Prob. 28PCh. 2.1 - Prob. 29PCh. 2.1 - A tumor may be regarded as a population of...Ch. 2.1 - Prob. 31PCh. 2.1 - Prob. 32PCh. 2.1 - Prob. 33PCh. 2.1 - Prob. 34PCh. 2.1 - Prob. 35PCh. 2.1 - Prob. 36PCh. 2.1 - Prob. 37PCh. 2.1 - Fit the logistic equation to the actual U.S....Ch. 2.1 - Prob. 39PCh. 2.2 - Prob. 1PCh. 2.2 - Prob. 2PCh. 2.2 - Prob. 3PCh. 2.2 - Prob. 4PCh. 2.2 - Prob. 5PCh. 2.2 - Prob. 6PCh. 2.2 - Prob. 7PCh. 2.2 - Prob. 8PCh. 2.2 - Prob. 9PCh. 2.2 - Prob. 10PCh. 2.2 - Prob. 11PCh. 2.2 - Prob. 12PCh. 2.2 - Prob. 13PCh. 2.2 - Prob. 14PCh. 2.2 - Prob. 15PCh. 2.2 - Prob. 16PCh. 2.2 - Prob. 17PCh. 2.2 - Prob. 18PCh. 2.2 - Prob. 19PCh. 2.2 - Prob. 20PCh. 2.2 - Prob. 21PCh. 2.2 - Prob. 22PCh. 2.2 - Prob. 23PCh. 2.2 - Prob. 24PCh. 2.2 - Use the alternatives forms...Ch. 2.2 - Prob. 26PCh. 2.2 - Prob. 27PCh. 2.2 - Prob. 28PCh. 2.2 - Consider the two differentiable equation...Ch. 2.3 - The acceleration of a Maserati is proportional to...Ch. 2.3 - Prob. 2PCh. 2.3 - Prob. 3PCh. 2.3 - Prob. 4PCh. 2.3 - Prob. 5PCh. 2.3 - Prob. 6PCh. 2.3 - Prob. 7PCh. 2.3 - Prob. 8PCh. 2.3 - A motorboat weighs 32,000 lb and its motor...Ch. 2.3 - A woman bails out of an airplane at an altitude of...Ch. 2.3 - According to a newspaper account, a paratrooper...Ch. 2.3 - Prob. 12PCh. 2.3 - Prob. 13PCh. 2.3 - Prob. 14PCh. 2.3 - Prob. 15PCh. 2.3 - Prob. 16PCh. 2.3 - Prob. 17PCh. 2.3 - Prob. 18PCh. 2.3 - Prob. 19PCh. 2.3 - Prob. 20PCh. 2.3 - Prob. 21PCh. 2.3 - Suppose that =0.075 (in fps units, with g=32ft/s2...Ch. 2.3 - Prob. 23PCh. 2.3 - The mass of the sun is 329,320 times that of the...Ch. 2.3 - Prob. 25PCh. 2.3 - Suppose that you are stranded—your rocket engine...Ch. 2.3 - Prob. 27PCh. 2.3 - (a) Suppose that a body is dropped (0=0) from a...Ch. 2.3 - Prob. 29PCh. 2.3 - Prob. 30PCh. 2.4 - Prob. 1PCh. 2.4 - Prob. 2PCh. 2.4 - Prob. 3PCh. 2.4 - Prob. 4PCh. 2.4 - Prob. 5PCh. 2.4 - Prob. 6PCh. 2.4 - Prob. 7PCh. 2.4 - Prob. 8PCh. 2.4 - Prob. 9PCh. 2.4 - Prob. 10PCh. 2.4 - Prob. 11PCh. 2.4 - Prob. 12PCh. 2.4 - Prob. 13PCh. 2.4 - Prob. 14PCh. 2.4 - Prob. 15PCh. 2.4 - Prob. 16PCh. 2.4 - Prob. 17PCh. 2.4 - Prob. 18PCh. 2.4 - Prob. 19PCh. 2.4 - Prob. 20PCh. 2.4 - Prob. 21PCh. 2.4 - Prob. 22PCh. 2.4 - Prob. 23PCh. 2.4 - Prob. 24PCh. 2.4 - Prob. 25PCh. 2.4 - Prob. 26PCh. 2.4 - Prob. 27PCh. 2.4 - Prob. 28PCh. 2.4 - Prob. 29PCh. 2.4 - Prob. 30PCh. 2.4 - Prob. 31PCh. 2.5 - Prob. 1PCh. 2.5 - Prob. 2PCh. 2.5 - Prob. 3PCh. 2.5 - Prob. 4PCh. 2.5 - Prob. 5PCh. 2.5 - Prob. 6PCh. 2.5 - Prob. 7PCh. 2.5 - Prob. 8PCh. 2.5 - Prob. 9PCh. 2.5 - Prob. 10PCh. 2.5 - Prob. 11PCh. 2.5 - Prob. 12PCh. 2.5 - Prob. 13PCh. 2.5 - Prob. 14PCh. 2.5 - Prob. 15PCh. 2.5 - Prob. 16PCh. 2.5 - Prob. 17PCh. 2.5 - Prob. 18PCh. 2.5 - Prob. 19PCh. 2.5 - Prob. 20PCh. 2.5 - Prob. 21PCh. 2.5 - Prob. 22PCh. 2.5 - Prob. 23PCh. 2.5 - Prob. 24PCh. 2.5 - Prob. 25PCh. 2.5 - Prob. 26PCh. 2.5 - Prob. 27PCh. 2.5 - Prob. 28PCh. 2.5 - Prob. 29PCh. 2.5 - Prob. 30PCh. 2.6 - Prob. 1PCh. 2.6 - Prob. 2PCh. 2.6 - Prob. 3PCh. 2.6 - Prob. 4PCh. 2.6 - Prob. 5PCh. 2.6 - Prob. 6PCh. 2.6 - Prob. 7PCh. 2.6 - Prob. 8PCh. 2.6 - Prob. 9PCh. 2.6 - Prob. 10PCh. 2.6 - Prob. 11PCh. 2.6 - Prob. 12PCh. 2.6 - Prob. 13PCh. 2.6 - Prob. 14PCh. 2.6 - Prob. 15PCh. 2.6 - Prob. 16PCh. 2.6 - Prob. 17PCh. 2.6 - Prob. 18PCh. 2.6 - Prob. 19PCh. 2.6 - Prob. 20PCh. 2.6 - Prob. 21PCh. 2.6 - Prob. 22PCh. 2.6 - Prob. 23PCh. 2.6 - Prob. 24PCh. 2.6 - Prob. 25PCh. 2.6 - Prob. 26PCh. 2.6 - Prob. 27PCh. 2.6 - Prob. 28PCh. 2.6 - Prob. 29PCh. 2.6 - Prob. 30P
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.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 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).arrow_forwardWe 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,…arrow_forwardYou are an investor who receives daily price quotes for a stock. The span of a stock's price on a given day is the number of consecutive days, from the given day going backwards, on which its price was less than or equal to its price on the day we are considering. Thus, the Stock Span Problem is as follows: Given a series of daily price quotes for a stock, find the span of the stock on each day of the series. Assume you are given seven daily stock quotes: 3, 10, 4, 7, 9, 6, and 8. Assume further that these stock quotes are stored in the array quotes. Show a step-by-step, manual desk-check execution of the algorithm below showing the values of all variables and arrays for each step in each cycle of each loop, as demonstrated in clase Algorithm: A Simple Stock Span Algorithm SimpleStockSpan (quotes) spans Input: quotes, an array with n stock price quotes Output: spans, an array with n stock price spans 1 spans CreateArray (n) 2 for i-0 to n do k+1 span_endFALSE while i-k 20 and not…arrow_forward
- You are an investor who receives daily price quotes for a stock. The span of a stock's price on a given day is the number of consecutive days, from the given day going backwards, on which its price was less than or equal to its price on the day we are considering. Thus, the Stock Span Problem is as follows: Given a series of daily price quotes for a stock, find the span of the stock on each day of the series. Assume you are given seven daily stock quotes: 3, 10, 4, 7, 9, 6, and 8. Assume further that these stock quotes are stored in the array quotes. Show a step-by-step, manual desk-check execution of the algorithm below showing the values of all variables and arrays for each step in each cycle of each loop, as demonstrated in clase Algorithm: A Simple Stock Span Algorithm SimpleStockSpan (quotes) → spans Input: quotes, an array with n stock price quotes Output: spans, an array with n stock price spans 2 3 4 5 6 7 8 10 11 spans CreateArray (n) ← for i0 to n do k 1 span_end FALSE while…arrow_forwardANSWER ALL QUESTIONSarrow_forwardWhen maximizing a function, the gradient at a given point will always point in Notes: In machine learning, when we are trying to learn parameters to solve a problem the direction of the gradient will be crucial to finding "good" parameters! any direction the direction of steppest ascent the direction away from the origin the direction of steppest descentarrow_forward
- Please help step to step with Program R (CS) with explanation and final code for understanding thank you.arrow_forwardConsider the following growing network model in which each node i is assigned an attractiveness a¿ € N+ drawn from a distribution π(a). Let N(t) denote the total number of nodes at time t. At time t = 1 the network is formed by two nodes joined by a link. - At every time step a new node joins the network. Every new node has initially a single link that connects it to the rest of the network. - At every time step t the link of the new node is attached to an existing node of the network chosen with probability II; given by where Z = Ili = ai Z' Σ aj. j=1,...,N(t−1)arrow_forwardIt is known that a natural law obeys the quadratic relationship y = ax“. What is the best line of the form y = px + q that can be used to model data and minimize Mean-Squared-Error if all of the data points are drawn uniformly at random from the domain [0,1]? r* ur, a,arrow_forward
- 1. In a two-class problem, the likelihood ratio is p(x|C₁) p(x|C₂) Write the discriminant function in terms of the likelihood ratio.arrow_forwardConsider a maximization problem that is being solved by Simulated Annealing. Let the objective function value of the current state, s, be 1000. Let this state have 5 successors/neighbors: s1(950), s2(975), s3(1000), s4(1000), and s5(1050). The numbers in parentheses represent the corresponding objective function values. The current temperature is 100. The probability that the next state is: 1. s1 = [Select] 2. s2 = [Select] 3. s3 [Select] = 4. s4= [Select] [Select] 5. s5 0.778 0.121 0.156 0.2 0.606arrow_forwardPlease help step to step with Program R (CS) with explanation and final code for understanding thank you.arrow_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