# subs_expr with e^t

Is there a reason why subs_expr() won't work here?

sage: version() 'Sage Version 4.7.2, Release Date: 2011-10-29' sage: t = var('t') sage: foo = e^t sage: foo.subs_expr(e==e.n()) e^t sage:

subs_expr with e^t

Is there a reason why subs_expr() won't work here?

sage: version() 'Sage Version 4.7.2, Release Date: 2011-10-29' sage: t = var('t') sage: foo = e^t sage: foo.subs_expr(e==e.n()) e^t sage:

add a comment

5

Use a wild card (a variable that matches everything) to do complicated subs_expr. I would suggest this technique to be written in sage tutorials. It is very useful to me.

```
sage: t = var('t')
sage: foo = e^t
sage: w0 = SR.wild(0)
sage: foo.subs_expr(e^w0==e.n()^w0)
2.71828182845905^t
```

1

Asked: **
2012-01-01 17:13:51 -0500
**

Seen: **157 times**

Last updated: **Jan 02 '12**

Substitution using Dictionary with Matrix as Value

How do I make functional substitutions?

incomplete substitution of expression

Substituting function value in an expression

how to use certain maxima functions (e.g. ratsubst)?

Change of variable in an integration

How can I substitute "target" functions inside expressions?

Is it possible to define (or assume) the derivative of a function

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.