Download ISE212

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Lorentz force wikipedia , lookup

Mathematical descriptions of the electromagnetic field wikipedia , lookup

Relativistic quantum mechanics wikipedia , lookup

Transcript
ISE212
Engineering Computing: MATLAB
Homework #7
Due: Friday 5/10
Spring_2013
Upload your HW7 assignments to the TA by going to Content in Blackboard:
1. Create a function that computes the area A and circumference C of a circle, given its radius as
an input argument.
(Name your m-file>>> circle.m).
Ans=
2. Write an executable script file (m-file) that takes no input and solves then simplifies the
following nonlinear first-order differential equation:
d y /d t = 4 – y 2
>>> y(0) = 1
(Name your m-file>>> desolved.m).
Ans=
3. Write an executable script file (m-file) that takes no input and uses the dsolve function to
solve the first-order ordinary differential equation (ODE) shown below and then utilizes the
ezplot function combined with the axis command to plot the solution between x values of 0 to 5
and y values of 0 to 1. (Note that the expression is automatically placed at the top of the plot and
that the axis label for the independent variable is automatically placed). (Name your m-file>>>
wavesagain.m).
dy/dt + 20y = 10 + 4sin(4t) >>> y(0) = 0
Ans:
4. Simple harmonic motion, or oscillation, is exhibited by structures that have elastic restoring
forces. (Any particle undergoing small oscillations about a point of stable equilibrium executes
simple harmonic motion). There are many situations in nature illustrating this behavior. For
example, such systems can be modeled by the spring-mass schematic shown below. The body
rests on a horizontal frictionless surface. If the body
is displaced from equilibrium and released, the only
horizontal force acting on the mass m is the restoring
force of the spring FS = -kx, where x is the
displacement from the equilibrium position and k is
the considered the stiffness of the spring which also
represents a constant spring property in this model. The minus sign indicates that the direction of
the spring force and of the displacement is always opposite. Newton's law states F = ma or for
this illustration -kx = ma which we can rewrite and solve for acceleration of the mass as
a = -(k/m)x. If x = x(t) denotes the displacement of the mass m from its equilibrium position as a
function of time, t, the equation of motion for this system then becomes:
d2x/dt2 + (k/m)x = 0 or
md2x/dt2 + kx = 0
When a body is subject to an elastic restoring force only, the mechanical energy of the system
remains constant and the oscillatory motion persists indefinitely with undiminished amplitude.
This ideal situation is not ordinarily achieved, because of the presence of dissipative forces. For,
in addition to the elastic restoring force, there is always a force which acts to oppose the motion.
For example, the kinetic force of friction damps the motion. Such motion is called damped
harmonic motion as seen in the illustration below. The resistive force FR = -cv where v is the
body's velocity and c is a resistance constant and the equation of motion for the damped system
then becomes:
md2x/dt2 + cdx/dt + kx = 0
Write an executable script file (m-file) that takes no input
and uses the dsolve function to find and plot (utilizing ezplot) the solution for t = 0 to 10 for the
case where a spring-mass system is governed by the following second-order differential damped
oscillator equation with stated initial conditions:
2d2x/dt2 + dx/dt + 8x = 0 >>> x(0) = 2, Dx(0) = 0
(Name your m-file>>> damper.m).
Plot Title: Position of Mass
(Note: Units have been removed for your convenience).
Ans:
5. Differential equations, in general, are much harder to solve than algebraic equations.
Therefore, is it possible to transform differential equations into algebraic equations? Luckily it
turns out that there is! Such transforms, in general, involve multiplying each term in the
differential equation by a suitable function called the kernel and integrating each term over the
domain of the differential equation with respect to the independent variable. The result is an
equation that does not involve any derivatives of the independent variable. The unknown
function is then determined by algebraically solving for the transformed function and applying
the inverse transformation. All of these transformations involve integrations and each
transformation has certain limitations (conditions) associated with it, and each is applicable to
certain types of engineering problems. For this homework problem, we will employ the use of a
Laplace Transform to solve a differential equation that appears in nuclear physics. Laplace
transforms are particularly suited to engineering problems whose independent variable varies
from zero to infinity, such as dynamic problems that deal with time. Here, we will use the
Laplace transform to solve a linear differential equation with constant coefficients and systems of
equations. The Laplace transform is simply an integral transform with integration limits 0 and ∞
and the kernel e-st. It is denoted by L, and the transform function f(t) is defined as:
L{f(t)} = ∫0∞ e-stf(t) dt
In nuclear physics, the following fundamental relationship governs radioactive decay: the
number of radioactive atoms x in a sample of a radioactive isotope decays at a rate proportional
to x. (Radioactive decay is the process by which an atomic nucleus of an unstable atom loses
energy by emitting ionizing particles). This leads to the first order linear differential equation:
dx/dt = -ax
where a is the decay constant for a given type of radioactive isotope. The Laplace transform can
be used to solve this differential equation. Rearranging the equation to one side, we have:
dx/dt + ax = 0
Write an executable script file (m-file) that takes no input and uses the laplace function to solve
and plot (utilizing ezplot) the solution for the first order linear differential equation listed above.
Plot for time units t = 0 to 500 with a Delay Constant = 0.01 and a starting amount of atoms
x(0) = 250.
(Name your m-file >>> laplacehwn5.m).
Ans:
THE END