posted 10 months ago

\tan ^{-1} x=x-\frac{x^{3}}{3}+\frac{x^{5}}{5}-\frac{x^{7}}{7}+\cdots \quad=\sum_{m=0}^{\infty} \frac{(-1)^{m} x^{2 m+1}}{2 m+1}(-1 \leq x \leq 1)

The user should be prompted for x, and the script should check to see if abs(x) is <1 before proceeding. Then calculate the result until term< tol like u sual and display actual answer and the series answer. You just did this... I want to give a chance for those who couldn't do it last time.

Lets leave it at that. We also have a final next week.

posted 10 months ago

a) Use Simpsons rule on excel to do this numerically.

b) Optional.. try this by hand symbolically...

c) Do this both numerically and symbolically with MATLAB using built in functions. (this is 4lines of code!!)

posted 10 months ago

\frac{d h}{d t}=\frac{Q}{A_{t}}-\frac{A_{t}}{A_{h}} \sqrt{2 g h}

Where Q is the flow rate in At is the tank area Ah is the hole area and h is the height in the tank. Lets say the hole diameter in 10 cm (watch your units) , the tank diameter is 1 m, Q is0.05 m3/sec, and g is 9.8066 m/s?. We will assume the initial height in the tank is 10 m and we can assume the tank is very tall (it wont overflow). Now don't get spooked by the problem.We want to use Euler's method to generate a table of h vs time. You will find this very similar to some examples I provided under "Euler". It should be easy to modify.

a) OK so set this up using Eulers method. Try a step size of 50 sec and run it out long enough to see what happens. (at least 5000 seconds).

b) At the point where the level becomes constant (it will) what is the flow rate out? (think .. this doesn't require a calculation.)

Add another column to use modified Euler with the predictor /corrector step.

Write a livescript program which asks the user for the flow rate in and the time duration., but has the other dimensions "built in" (that is just type dt=1, and dh =0.1, etc. Your livescript should generate an array of h vs t. Have the script plot h vs t. Just use straight Euler for this... not modified.

posted 10 months ago

b) OK again for a bar. The left hand temp To is 120 C. Then stepping to the right, the next"point" T1 is 115, the next T2 is 109, then T3 = 107 and so on to the end. Delta x is 0.1m

posted 10 months ago

f(x, y)=23 y^{\wedge} 2-3 x^{\wedge} 6+23

a) Write an anonymous function in MATLAB and write a livescript to ask the user to input xa nd then to input y and then have the function print out the answer

b) Have your livescript plot the value of f vs x from 0 to 10 for y = -2.

posted 10 months ago

in MATLAB z=sqr(4) will return 2

in MATLAB an IF and For statement may share the same end statement

MATLAB the following code would work to calculate sum of squares

The MATLAB operator <> is used to determine inequality between variables.

In MATLAB, if x is a matrixx.^2 is a valid statement

cos (60 degrees) is in fact 0.5 In excel cos(60) will give 0.5

Centered finite differences are more accurate than forward or backward finitedifferences.

In MATLAB, For, for, FOR are all equivalent

posted 10 months ago

conductive shell and (b) plot H as a function of radial distance from the z-axis over the range 0 < 22< 12 cm.

posted 10 months ago

posted 10 months ago

posted 10 months ago