Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simplify using custom function

  • To: mathgroup at
  • Subject: [mg47688] Re: [mg47676] Simplify using custom function
  • From: Bob Hanlon <hanlonr at>
  • Date: Thu, 22 Apr 2004 02:38:32 -0400 (EDT)
  • Reply-to: hanlonr at
  • Sender: owner-wri-mathgroup at

expr=-1+2 x+2 E^x;

expr /. E^x -> f[x]-x  // Simplify

2 f(x)-1

However, f[x] cannot be defined or you will be back at expression.

Bob Hanlon

> From: Jens <jens at>
To: mathgroup at
> Date: 2004/04/21 Wed AM 05:23:20 EDT
> To: mathgroup at
> Subject: [mg47688] [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 
> that? (It's Mathematica 5.0)
> Jens

  • Prev by Date: Re: Partitioning a list into unequal partitions
  • Next by Date: RE: Dashing option and Plot
  • Previous by thread: Re: Simplify using custom function
  • Next by thread: RE: Simplify using custom function