# Revision history [back]

### automatic substitution within functions?

what i do to do this?

>>>var('t w')

>>>f(t) = sin(w*t)

>>>f
t |--> sin(t*w)

>>>w=2

>>>f
t |--> sin(2*w)


### automatic substitution within functions?

what i do to do this?

>>>var('t w')

>>>f(t) = sin(w*t)

>>>f
t |--> sin(t*w)

>>>w=2

>>>f
t |--> sin(2*w)


Without doing f(w=2)!!! imagine that the function is f->f(a,b,c,d,f....,t)

 3 Changed formatting to be more concise, reflect sage: prompts. Mike Hansen 4048 ●23 ●48 ●89

### automatic substitution within functions?

what i do to do this?

>>>var('t sage: var('t w')

>>>f(t) sage: f(t) = sin(w*t)

>>>f
t |--> sin(t*w)

>>>w=2

>>>f
sage: w = 2
sage: f
t |--> sin(2*w)


Without doing f(w=2)!!! imagine that the function is f->f(a,b,c,d,f....,t)

### automatic substitution within functions?

what i do to do this?

sage: var('t w')
sage: f(t) = sin(w*t)
t |--> sin(t*w)
sage: w = 2
sage: f
t |--> sin(2*w)


Without doing f(w=2)!!! imagine that the function is f->f(a,b,c,d,f....,t)f->f(a,b,c,d,f....,t) like doing this:

...
...
sage: aw1=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
sage: aw2=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
sage: aw4=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
...
...


etc

### automatic substitution within functions?

what i do to do this?

sage: var('t w')
sage: f(t) = sin(w*t)
t |--> sin(t*w)
sage: w = 2
sage: f
t |--> sin(2*w)


Without doing f(w=2)!!! imagine that the function is f->f(a,b,c,d,f....,t) like doing this:

...
...
sage: aw1=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
aw1=aw1(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
sage: aw2=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
sage: aw4=aw2(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
aw4=aw4(m1=1,m2=0.5,l1=1,l2=0.5,g=9.8)
...
...


etc