Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

5. MathScript Numerical Integral [MathScript Only] It is easy to show analyti- c

ID: 3198739 • Letter: 5

Question

5. MathScript Numerical Integral [MathScript Only] It is easy to show analyti- cally that the integral sx dx equals exactly 1.Open a LabVIEW MathScript Window and then type help quadn_trap in the Command Window. After learning the syntax of the MathScript command quadn_trap, write a VI that uses quadn_trap within a MathScript Node to calculate the integral '5x dx numerically, and then display the result in a front-panel indicator with Digits of precision equal to 5. For your numerical result to be correct to five decimal places (i.e., the first five decimal places are all zero), how many x-values must be supplied to quadn-trap within the integration range x=0 to x=1?

Explanation / Answer

To have the function evaluate 5x^4 the input vector should be x=[0,0,0,0,5]. The coefficients will follow [c,x,x^2…]. The way the quadn_trap function works the approximation will not be 1 but 2.5. If you want to evaluate the integral over the range use the quada_nc8 function.

f='5*x^4';

A=quada_nc8(f,0,1);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote