RE: Simplify using custom function

• To: mathgroup at smc.vnet.net
• Subject: [mg47697] RE: [mg47676] Simplify using custom function
• From: "DrBob" <drbob at bigfoot.com>
• Date: Thu, 22 Apr 2004 02:38:49 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```expr = -1 + 2*x + 2*E^x;
f[x_] = x + E^x
Off[Eliminate::ifun]
Eliminate[{expr == y, f[x] == z}, x]
Block[{f}, result = First[%] /.
z -> f[x]];
resultE^x + x
-1 + 2*z == y
-1 + 2*(E^x + x)

?result
Global`result
result = -1 + 2*f[x]

DrBob

www.eclecticdreams.net

-----Original Message-----
From: Jens [mailto:jens at tnntw10.tn.tudelft.nl]
To: mathgroup at smc.vnet.net
Subject: [mg47697] [mg47676] Simplify using custom function

What I'm trying to achieve is to find a certain function in a more
complicated expression:

example:    complicated expression: -1+2 x +2 e^x
function: f[x_]=x+e^x

Mathematica should return: -1+2 f[x]

I've been looking at TransformationFunctions and FullSimplify, but did
not succeed in defining a transformation function so far. How do I do
that? (It's Mathematica 5.0)

Jens

```

• Prev by Date: RE: Dashing option and Plot
• Next by Date: RE: Dashing option and Plot
• Previous by thread: Re: Simplify using custom function
• Next by thread: Re: Simplify using custom function