0% found this document useful (0 votes)
121 views6 pages

Practical 5

1. The document describes two models: (1) a single cold pill model with decay of the drug and production of effects over time, and (2) a course of cold pills model. For each model, the differential equations are given and the models are solved and plotted. 2. Two population growth models are also described: (1) limited growth without harvesting using the logistic equation, and (2) limited growth with harvesting. For each model, the differential equation is provided and the model is solved and plotted. 3. Key parameters and variables are defined for each model, the differential equations are solved using DSolve, and the solutions are plotted over time to visualize the behavior of the models.

Uploaded by

sahil singhania
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views6 pages

Practical 5

1. The document describes two models: (1) a single cold pill model with decay of the drug and production of effects over time, and (2) a course of cold pills model. For each model, the differential equations are given and the models are solved and plotted. 2. Two population growth models are also described: (1) limited growth without harvesting using the logistic equation, and (2) limited growth with harvesting. For each model, the differential equation is provided and the model is solved and plotted. 3. Key parameters and variables are defined for each model, the differential equations are solved using DSolve, and the solutions are plotted over time to visualize the behavior of the models.

Uploaded by

sahil singhania
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Practical-5

Section 1
Case of a single cold pill and a course of cold pills

1.1 Case of a single cold pill.

Question:-(1) Solve drug single cold pill model and plot its graph.

Solution:-
Needs"PlotLegends`"
eqn1  x 't   k1 xt
eqn2  y 't  k1 xt  k2 yt
sol  DSolveeqn1, eqn2, x0  1, y0  0, x, y, t
solx  xt . sol .
k1  1.3860, k2  0.1386, k1  0.6931, k2  0.0231, k1  0.6931, k2  0.08
soly  yt . sol . k1  1.3860, k2  0.1386,
k1  0.6931, k2  0.0231, k1  0.6931, k2  0.08
Plotsolx1, solx2, t, 0, 15,
PlotStyle  Thickness0.02, Thickness0.03,
PlotLegend  "Decogestant", "Antihistamine in GITract"
Plotsoly1, soly2, soly3, t, 0, 15,
PlotStyle  Thickness0.02, Thickness0.03, Thick,
PlotLegend  "Decogestant", "Antihistamine", "Antihistamine in blood"
x t   k1 xt

y t  k1 xt  k2 yt

k1 tk2 t  k1 t  k2 t  k1


x  Functiont, k1 t , y  Functiont,  
k1  k2
1.386 t , 0.6931 t , 0.6931 t 

 1.11111 1.5246 t 0.1386 t  1.386 t ,


 1.03448 0.7162 t 0.0231 t  0.6931 t ,  1.13048 0.7731 t 0.08 t  0.6931 t 
2 Practical_5[1].nb

0.20

0.15

0.10

0.05

Decogestant

2 4 6 8 10 12 14
Antihistamine in GI-T

0.8

0.6

0.4

Decogestant

0.2

Antihistamine

2 4 6 8 10 12 14
Antihistamine in blo

1.2 Case of a course of cold pills

Question:-(2) Solve course of cold pills model and plot its graph.

Solution:-
Practical_5[1].nb 3

Needs"PlotLegends`"
eqn1  x 't  A  k1 xt
eqn2  y 't  k1 xt  k2 yt
A1
sol  DSolveeqn1, eqn2, x0  0, y0  0, x, y, t
solx  xt . sol . k1  1.3860, k2  0.1386, k1  0.6931, k2  0.0231
soly  yt . sol . k1  1.3860, k2  0.1386, k1  0.6931, k2  0.0231
Plotsolx1, solx2, t, 0, 60,
PlotStyle  Thickness0.02, Thickness0.03,
PlotLegend  "Decogestant", "Antihistamine in GITract"
Plotsoly1, soly2, t, 0, 60,
PlotStyle  Thickness0.02, Thickness0.03, Thick,
PlotLegend  "Decogestant", "Antihistamine"
x t  A  k1 xt

y t  k1 xt  k2 yt

k1 t  1  k1 t 
x  Functiont, , y 

Functiont, k1 tk2 t k1 t k1  k1 tk2 t k1  k2 t k2  k1 tk2 t k2  k2  k1  k2
k1

0.721501 1.386 t  1  1.386 t , 1.44279 0.6931 t  1  0.6931 t 

 5.78404 1.5246 t  0.1386 0.1386 t  1.386 1.386 t  1.2474 1.5246 t ,
 64.612 0.7162 t  0.0231 0.0231 t  0.6931 0.6931 t  0.67 0.7162 t 

1.4

1.2

1.0

0.8

0.6

0.4

0.2 Decogestant

10 20 30 40 50 60
Antihistamine in GI-T
4 Practical_5[1].nb

30

25

20

15

10

5 Decogestant

10 20 30 40 50 60
Antihistamine

Section-2
Limited growth of population(with and without
harvesting)

2.1 Limited growth of population without


harvesting(i.e.Logistic Equation)
Question:-(1) Solve limited growth model without harvesting and plot its
graph.

Solution:-
Practical_5[1].nb 5

r  1; k  1000;
eqn  x 't  r xt 1  xt  k
sol  DSolveeqn, x0  1, xt, t
Plotxt . sol, t, 0, 10, PlotStyle  Red, Thickness0.03,
PlotRange  All, AxesLabel  t, xt

x t  1 
xt
xt
1000

6ROYH
LIXQ
 
,QYHUVH
IXQFWLRQV
DUHEHLQJXVHGE\ 6ROYH
VRVRPH VROXWLRQV
PD\ QRWEH IRXQGXVH5HGXFHIRUFRPSOHWHVROXWLRQ
LQIRUPDWLRQ

xt  
1000 t
999  t
xt

800

600

400

200

t
2 4 6 8 10

2.2 Limited growth of population with harvesting:-


Question:- 2 Solve limited growth model with harvesting and plot its graph.

Solution
6 Practical_5[1].nb

r1
k  10
h  9  10
eqn  x 't   r  k  xt ^ 2  k xt  k h  r
sol  DSolveeqn, x0  2, xt, t
Plotxt . sol, t, 0, 8, PlotStyle  Magenta, Thickness0.02,
PlotRange  All, AxesLabel  t, xt

10

9
10

x t   9  10 xt  xt2 


1
10

6ROYH
LIXQ
 
,QYHUVH
IXQFWLRQV
DUHEHLQJXVHGE\ 6ROYH
VRVRPH VROXWLRQV
PD\ QRWEH IRXQGXVH5HGXFHIRUFRPSOHWHVROXWLRQ
LQIRUPDWLRQ

xt  
7  9 4 t5
7  4 t5
xt
9

t
2 4 6 8

You might also like