Epidemic (Diff Equation)

• Apr 30th 2006, 09:54 AM
Natasha1
Epidemic (Diff Equation)
The spread of a disease in a community is modelled by the following differential equation:

dy/dx = 0.2y - 0.02x where y is the number of infected individuals in thousands, and x the time in days.

1) Show the equation that for the family of 'curves' in the plane for which dy/dx is a constant, is the form y=mx+c.

2) Solve the equation using the linear 1st order method, given that initially there are on thousand infected individuals.
• Apr 30th 2006, 10:13 AM
ThePerfectHacker
Quote:

Originally Posted by Natasha1
The spread of a disease in a community is modelled by the following differential equation:

dy/dx = 0.2y - 0.02x where y is the number of infected individuals in thousands, and x the time in days.

1) Show the equation that for the family of 'curves' in the plane for which dy/dx is a constant, is the form y=mx+c.

2) Solve the equation using the linear 1st order method, given that initially there are on thousand infected individuals.

You have,
$\frac{dy}{dx}-(.2)y=-(.02)x$
This is a Linear-First Order Differencial Equation
Thus,
$P(x)=-.2$ and $Q(x)=-.02x$
Thus,
$I(x)=\exp \left( \int -.2dx \right)=e^{-.2x}$
Thus, the solutions are,
$y=\frac{1}{I(x)} \left( \int I(x)Q(x) dx \right)$
Substitute,
$y=e^{.2x}\int (-.02)e^{-.2x}x dx$
Thus,
$y=-(.02)e^{.2x}\int xe^{-.2x}dx$
Integrate by parts,
$y=-(.02)e^{.2x}\left( -5xe^{-.2x}+5\int e^{-.2x}dx \right)$
Thus,
$=(-.02)e^{.2x} \left( -5xe^{-.2x}-25e^{-.2x} \right)$
Thus,
$y=.1x+.5+C$
Thus all solutions are,
$y=.1x+C$

Maybe I made a mistake I did not check my work, need to go soon.
• Apr 30th 2006, 10:19 AM
ThePerfectHacker
Assuming I did everything correctly and that,
$f(x)=.1x+C$
Then initially ya have, $f(0)=2000$
Thus,
$f(0)=.1(0)+C=2000$
Thus,
$C=2000$

Thus, the unique equation that satisfies this OED is,
$y=.1x+2000$
• Apr 30th 2006, 10:19 AM
CaptainBlack
Quote:

Originally Posted by ThePerfectHacker
You have,
$\frac{dy}{dx}-(.2)y=-(.02)x$
This is a Linear-First Order Differencial Equation
Thus,
$P(x)=-.2$ and $Q(x)=-.02x$
Thus,
$I(x)=\exp \left( \int -.2dx \right)=e^{-.2x}$
Thus, the solutions are,
$y=\frac{1}{I(x)} \left( \int I(x)Q(x) dx \right)$
Substitute,
$y=e^{.2x}\int (-.02)e^{-.2x}x dx$
Thus,
$y=-(.02)e^{.2x}\int xe^{-.2x}dx$
Integrate by parts,
$y=-(.02)e^{.2x}\left( -5xe^{-.2x}+5\int e^{-.2x}dx \right)$
Thus,
$=(-.02)e^{.2x} \left( -5xe^{-.2x}-25e^{-.2x} \right)$
Thus,
$y=.1x+.5+C$
Thus all solutions are,
$y=.1x+C$

Maybe I made a mistake I did not check my work, need to go soon.

Which can't be right, as the initial condition gives $C=1000$, and
substituting the solution back into the equation gives:

$
0.1=200
$
.

:D

RonL
• Apr 30th 2006, 10:21 AM
ThePerfectHacker
Quote:

Originally Posted by CaptainBlack
Which can't be right, as the initial condition gives $C=1000$, and
substituting the solution back into the equation gives:

$
0.1=200
$
.

:D

RonL

Where is the mistake?
I hate making posts when I got to got in 20 minutes and they take like 30 minutes to write.
• Apr 30th 2006, 10:24 AM
CaptainBlack
Quote:

Originally Posted by ThePerfectHacker
Where is the mistake?
I hate making posts when I got to got in 20 minutes and they take like 30 minutes to write.

I will have to examine the solution carefully to find it, you are using a method
I don't usually employ so it will need more carefully examination that it would
normally take.

RonL
• Apr 30th 2006, 10:27 AM
Natasha1
I don't use that method either, well at least I haven't been taught it like that so for me it's double dutch as they say in England! Which means I still don't get it

RoL help ;)
• Apr 30th 2006, 10:28 AM
ThePerfectHacker
Natasha, the method I used was,
$\frac{dy}{dx}+P(x)y=Q(x)$
Then,
$y=\frac{1}{I(x)}\left( \int I(x)Q(x)dx \right)$
• Apr 30th 2006, 11:00 AM
CaptainBlack
Quote:

Originally Posted by Natasha1
The spread of a disease in a community is modelled by the following differential equation:

dy/dx = 0.2y - 0.02x where y is the number of infected individuals in thousands, and x the time in days.

1) Show the equation that for the family of 'curves' in the plane for which dy/dx is a constant, is the form y=mx+c.

2) Solve the equation using the linear 1st order method, given that initially there are on thousand infected individuals.

We have a linear first order ODE with constant coefficients.

$
\frac{dy}{dx}=0.2y-0.02x
$

The method I normaly employ to solve these equations is to find the general
solution $y_1(x)$ of the homeogeneous equation:

$
\frac{dy_1}{dx}=0.2y_1
$

Then if $y_2(x)$ is any solution (Particular Integral) of the original equation
then the general solution of the original equation $y(x)=y_1(x)+y_2(x)$.

Now to solve the homogeneous equation we try a solution of
the form: $y_1(x)=Ae^{kx}$, so:

$
k\ Ae^{kx}=0.2e^{kx}
$

therefore $k=0.2$, and $y_1(x)=Ae^{0.2x}$.

For the particular integral a reasonable guess would be of the form
$y_2(x)=ax+c$. Substituting this into the equation gives:

$
a=0.2ax+0.2c-0.02x
$
,

which means that $a=0.1$ and $c=0.5$

So the general solution to the DE is:

$
y(x)=Ae^{0.2x}+0.1x+0.5
$
.

Now when $x=0$ $y=1000$, so:

$
1000=A+0.5
$
,

hence $A=999.5$, and the solution is:

$
y(x)=999.5e^{0.2x}+0.1x+0.5
$
.

Given the wording of the problem I suspect that the intention is that you
use the method that PH was proposing (as it applies to general first order
ODEs)

RonL
• May 3rd 2006, 01:32 PM
ThePerfectHacker
I finally found my mistake :)
It was a common one, notice I forgot the Constant after the derivative.