MECH102 - Homework Hints, Answers, and Extra Requirements

Homework 10 (from Chapters 19, 21, 23)

counts as 2 homeworks (200 points)


TO ENHANCE YOUR LEARNING, PLEASE TRY TO WORK THE PROBLEMS FIRST WITHOUT LOOKING AT THE HINTS AND ANSWERS BELOW.

MAKE SURE YOU SATISFY ALL REQUIREMENTS LISTED BELOW AND IN THE ORIGINAL PROBLEM STATEMENTS (UNLESS INDICATED OTHERWISE BELOW).

NOTE - BECAUSE MOST ANSWERS ARE PROVIDED, IT IS VERY IMPORTANT THAT YOU SHOW ALL STEPS IN YOUR WORK.  THE GRADING WILL BE BASED ON THE COMPLETENESS, CLARITY, AND CORRECTNESS OF YOUR WORK, NOT JUST THE ANSWERS YOU PROVIDE.


19.4
[60 pts]
  • From Figure P19.4, T = 1.
  • Perform the integration for bk by hand (using integration by parts) AND by using MathCAD. If you haven't had integration by parts yet in calculus, please look it up in your calculus book and check out the examples. It requires only basic derivative and integral skills. Be sure to simplify you answer as much as possible. If you need help, please stop by during office hours.
  • You can integrate over any range that includes a full period of the wave. So if you define the function and integrate over -T/2 to T/2,which includes a full period of the wave, the equation of the line is simple and it applies over the whole range. If you integrate from 0 to T instead, you have to define the function and integrate over two separate ranges (0 to T/2, and T/2 to T). The function (line equation) is different for each range in this case. You will get the same answer with both methods, and both approaches are valid and correct, but the first is much easier.
  • Write out the first three nonzero terms (harmonics) of the Fourier Series.
  • Generate all plots over two cycles (periods) of the function.
  • Plot the first three terms (harmonics) individually on the same plot.
  • Plot the sum of the first 3 terms and the sum of the first 50 terms on the same plot.
  • Plot the amplitude magnitude spectrum for the first 10 harmonics (including the fundamental) as a histogram plot (bar chart).

21.1a,c,e,g
for the
integrals in 21.1,
21.2, and
21.3
[100 pts]

  • Parts b, d, and f are not required.
  • You can use MathCAD for the integral for part a.
  • For part c, write a MathCAD program to perform the trapezoid rule integration for any function. Define the program as a function so you can evaluate it for different functions, numbers of intervals (n), and different ranges (a and b).
  • NOTE: MathCAD does not allow range variables (other than in for loops) in programs.
  • Use the Simpson's 1/3 rule with n=6 (not n=5) for part g.
  • Also compute the true percent relative error for each integral approximation.
  • For part c, for problem 21.1, with n = 4, integral = 16.515, error = 0.311%
  • For part g, for problem 21.1, with n = 6, integral = 16.566, error = 0.000635%
23.1
[40 pts]
  • For the second-order forward difference: derivative = 0.72, error = 1.787%