Size: 535
Comment:
|
← Revision 4 as of 2010-08-12 10:31:37 ⇥
Size: 739
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
t=var('t') # t represents the time a,b,k=var('a b k') y=function('y',t) a=1;b=1;k=1 diffeq=diff(y,t)-a+b*cos(2*pi*t/24)+k*y sol=desolve(diffeq,[y,t],ics=(0,2)) sol plot(sol,(t,0,20)) |
t = var('t') # time in hrs a = var('a') # Avg. secretion rate b = var('b') k = var('k') y = function('y',t) # Amount of a certain hormone in blood at time = 't' sol=desolve (diff(y,t) - a + b*cos(2*pi*t/24) + k*y, [y,t]) print "General solution= ", sol a=1 b=1 k=1 sol1=desolve (diff(y,t) - a + b*cos(2*pi*t/24) + k*y, [y,t], ics=(0,2)) print "Specific solution= ", sol1 plot(sol1,(t,0,20)) |
Line 21: | Line 26: |
* Aashita Kesarwani , Student, IIT Roorkee | |
Line 22: | Line 28: |
*Kesarwani Aashita Chandrashekhar, Student, IIT Roorkee *Praveen Kumar, Student, IIT Roorkee |
* Praveen Kumar, Student, IIT Roorkee. |
Book
Advanced Engineering Mathematics
Author
Erwin Kreyszig
Edition
8th Edition
t = var('t') # time in hrs a = var('a') # Avg. secretion rate b = var('b') k = var('k') y = function('y',t) # Amount of a certain hormone in blood at time = 't' sol=desolve (diff(y,t) - a + b*cos(2*pi*t/24) + k*y, [y,t]) print "General solution= ", sol a=1 b=1 k=1 sol1=desolve (diff(y,t) - a + b*cos(2*pi*t/24) + k*y, [y,t], ics=(0,2)) print "Specific solution= ", sol1 plot(sol1,(t,0,20))
Solution by:
- Aashita Kesarwani , Student, IIT Roorkee
- Swati Ahuja, Student, IIT Roorkee
- Praveen Kumar, Student, IIT Roorkee.