Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.2K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Variable replacement in only parts of an expression

Posted 12 years ago
POSTED BY: Taushif Ahmed
2 Replies
Posted 12 years ago

.

In[1]:= A = (Log[s + t] + s2 + t s + u);A /. Log[s + t] -> Log[a + b]

Out[2]= s2 + s t + u + Log[a + b]
POSTED BY: Bill Simpson

Or

In[2]:= (Log[s + t] /. {s -> a, t -> b}) + s2 + t s + u

Out[2]= s2 + s t + u + Log[a + b]
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard