Tutor profile: Trenton B.
Questions
Subject: MATLAB
Develop a MATLAB script that is able to approximate the function y = sin(x) (where x is in degrees) within 1E-6 using a Taylor series. Display the approximation in the command window with the error and iteration count.
The general formula for the Taylor series of sin(x) is $$\Sigma\frac{x^{2n + 1}}{(2n+1)!}$$, where n is the number of iterations. Create a while loop that uses previous approximations to solve for new ones: $$y_{new} = y_{old} + \frac{x^{2n + 1}}{(2n+1)!}$$. The exit condition should be while err > 1E-6 where err = $$\frac{y_{new} - y_{true}}{y_{true}}$$ and $$y_{true} = sind(x)$$.Can output parameters using fprintf.
Subject: Basic Math
In the United States, screws and bolts are labeled as OD-TPI. Where OD is the outside diameter of the screw/bolt usually in inches (if less than 1/4 inches then they are given numbers such as 10, 8, 6, etc.) and TPI is threads per inch. Threads are small ridges on the bolt/screw. Let's say you know 40 threads are needed to properly secure something. What is the minimum screw length needed to accomplish this with a 1/4"-20 screw?
The TPI for a 1/4"-20 screw is 20. So divide 40 threads/20 TPI to give 2 inches.
Subject: Algebra
The nearest star system to our own solar system, Alpha Centarui, is roughly 4 light years away ($$3.78\times10^{13}$$ km). Let's say you plan on taking a trip to this solar system to bringing with you a 100 kg payload and can afford to sit tight in a spaceship for 5000 years. Assuming a constant burn, the exhaust velocity of your spaceship, $$c_e$$ is 5 km/s. Use the rocket equation ($$\Delta v = c_e ln(\frac{m_0}{m_f})$$) to determine the starting spacecraft mass $$m_0$$ (mostly fuel mass) needed to reach your destination. You can assume $$m_f\approx100$$ kg. Compare the answer to the mass of the moon (about $$7\times 10^{22}$$ kg).
First rearrange the rocket equation to a form that allows you to solve for $$m_0$$ immediately. The from required is $$m_0 = m_f exp(\frac{\Delta v}{c_e})$$. Can assume starting from rest and immediate acceleration to final velocity $$v_f$$. Solve for $$\Delta v = v_f - 0$$. Here, $$v_f$$ can be found from the simple formula $$d = v_f t$$ where d is distance and t is time (convert to seconds; 1 year = 31557600 s). Once $$v_f$$ is known, $$m_0$$ is found to be $$6.42\times 10^{22}$$ kg. This initial mass is almost the mass of the moon.
Contact tutor
needs and Trenton will reply soon.