Numerical Analysis in Engineering
ME 140A, Fall 2007
Midterm #2 solutions
Problem 1.
Solve through separation of variables:
dy
dx
=
x
2
1 +
y
2
(1)
Separate the variables and integrate
(1 +
y
2
)
dy
=
x
2
dx
y
+
y
3
3
=
x
3
3
+
c
where c is a constant of integration that has to be determined from initial conditions. Note
that the above equation is a cubic equation in
y
.
Problem 2.
Solve by finding an integrating factor:
xy
+ 2
y
= sin
x,
x >
0
(2)
Hint: (sin
x

x
cos
x
) =
x
sin
x
.
Solution
:
One can show that (see class notes) a first order ODE in the form of
y
+
p
(
x
)
y
=
g
(
x
) has
an integrating factor defined by
μ
(
x
) =
e
p
(
x
)
dx
.
(3)
For the given ODE, dividing both sides by
x
, gives us
y
+
2
x
y
=
sin
x
x
(4)
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
which is in the form that allows us to use the integrating factor method. Therefore,
μ
(
x
) is
found as
μ
(
x
) =
e
2
x
dx
=
e
2 ln
x
=
e
ln
(
x
2
)
=
x
2
.
(5)
Multiplying
μ
(
x
) to both sides of equation (4) will give us
x
2
y
+ 2
xy
=
x
sin
x
→
d
dx
x
2
y
=
x
sin
x
→
d x
2
y
=
x
sin
xdx
(6)
Now, one can easily integrate both sides of equation (6) to find
d x
2
y
=
x
sin
xdx
x
2
y
=
C
+
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Meiburg
 Sin, Constant of integration

Click to edit the document details