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

An engineering problem involves the determination of the length of a flat sheet

ID: 3579481 • Letter: A

Question

An engineering problem involves the determination of the length of a flat sheet of metal required to build a sheet of corrugated roofing. The cross-section of the roofing is shaped Into the form of a sine wave by a machine. Supposed a corrugated sheet of length three feet is needed, the height of each wave is one Inch from the center line, and each wave has a period of approximately 2n inches. The problem of finding the length of the initial flat sheet is one of finding The arc length L of the curve given in this case by f(x) = sin x from x = 0 inches to 36 inches. The arc length can be approximated as the sum of the length of many small straight segments As. The length of each segment is calculated using the Pythagoras theorem. For f(x) = sin x, it can be shown that the slope of Delta s is Delta f/Delta x = cos x. The total are length is which converges to the actual are length as Ax get smaller and smaller. Compute The arc length L by integrating the squareroot term In the summation between 0 and 36 Inches. Use enough integration steps to obtain a result accurate to two decimal places expressed in inches.

Explanation / Answer

Our problem can be solved using for loop over x from 0 to 36

#include<iostream>
#include<cmath> //library for power and sqrt function
#include<stdio.h> //library for printf function
using namespace std;
float myFunction(float x){ //function to calculate the value of delta s
return sqrt(1+pow(cos(x),2));
}
int main(){
float length=0;
for(float x=0; x<=36; x+=0.001){ //Incrementing the x by 0.001 i.e value of delta x = 0.001
length += myFunction(x)*0.001;
}
printf("The length of required sheet is equal to %0.2f",length); //to display the output in two decimal place
}