Question

The integral integral_3^9 x^2 dx can be calculated

0 0
Add a comment Improve this question Transcribed image text
Answer #1

function NumericalInt ) slear sls a 3 b=9; n=4 for i = 1:n LsumLsum t(i-1) A2)*dx) *dx)*dx; end display(dx) displav (Lsum) enoutput: Result Executing the program Soctave -qf --no-window-system main nm n4 1.5000 47.250

copyable code:

main function:

NumericalInt()

support function:

function NumericalInt()
clear
clc
Lsum = 0;
a = 3;
b = 9;
n = 4
dx = (b-a)/n;
for i = 1:n
Lsum = Lsum +((((i-1)^2)*dx)*dx)*dx;
end

display(dx)
display(Lsum)
end % end of sub-function

Add a comment
Know the answer?
Add Answer to:
The integral integral_3^9 x^2 dx can be calculated approximately by the left sum method (finding the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Numerical Integration The integral of a function f(x) for a s x S b can be interpreted as the ...

    1. Numerical Integration The integral of a function f(x) for a s x S b can be interpreted as the area between the f(x) curve and the x axis, bounded by the limits x- a and x b. If we denote this area by A, then we can write A as A-f(x)dx A sophisticated method to find the area under a curve is to split the area into trapezoidal elements. Each trapezoid is called a panel. 1.2 0.2 1.2 13...

  • can you please solve all the questions 4 a) Find fx) dx using the Left-hand Sum....

    can you please solve all the questions 4 a) Find fx) dx using the Left-hand Sum. ONote ar is not 2 1 consta) fx) 5.75 9.5 12 14 b) Sketch the rectangles used to evaluste the definite integral in a) 10 Evaluate the definite integral using the Right-hand Sum e) fn The regions A. B, and C in the figure above are bounded by the graph of the function fand the a-axis If the area of each 5. region is...

  • 4. Another approximation for integrals is the Trapezoid Rule: integral (a to b)f(x) dx ≈ ∆x/2...

    4. Another approximation for integrals is the Trapezoid Rule: integral (a to b)f(x) dx ≈ ∆x/2 (f(x_0) + 2f(x_1) + 2f(x_2) + · · · + 2f(x_n−2) + 2f(x_(n−1)) + f(x_n)) There is a built-in function trapz in the package scipy.integrate (refer to the Overview for importing and using this and the next command). (a) Compute the Trapezoid approximation using n = 100 subintervals. (b) Is the Trapezoid approximation equal to the average of the Left and Right Endpoint approximations?...

  • Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2...

    Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2 +3x−7 Calculate the accuracy of the solution to 1 × 10−10. Find the number of iterations required to achieve this accuracy. Compute the root of the equation with the bisection method. Your program should output the following lines: • Bisection Method: Method converged to root X after Y iterations with a relative error of Z.

  • python 2..fundamentals of python 1.Package Newton’s method for approximating square roots (Case Study 3.6) in a...

    python 2..fundamentals of python 1.Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the input number as an argument and returns the estimate of its square root. The script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key. 2.Convert Newton’s method for approximating square roots in Project 1 to a recursive function named newton. (Hint: The estimate of...

  • Matlab Regula Falsi Method A zero of f(x) = x^2 -4x-12.2 is known to exist on...

    Matlab Regula Falsi Method A zero of f(x) = x^2 -4x-12.2 is known to exist on the interval [1.2 , 2.2 , 3.2,...9.2] and respective right endpoints x1 =[2.2 ,3.2, 4.2....10.2], find the sub-interval in which the zero exists. Set the left endpoint of this sub-interval =a and the right endpoint=b With tolerance of 10^-9, use the Regular Falsi method to compute the root of (f) in [a,b] User input is required at ##### CONTENTS Close Courses LMS Integration Documentation...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT