Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2010-08-11 10:35:47
Size: 535
Editor: PraveenKumar
Comment:
Revision 4 as of 2010-08-12 10:31:37
Size: 739
Editor: Aashita
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.

SageDays/Kreyszig-1.6-40 (last edited 2010-08-12 10:31:37 by Aashita)