Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg47689] Re: [mg47676] Simplify using custom function
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 22 Apr 2004 02:38:33 -0400 (EDT)
  • References: <200404210923.FAA02461@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 21 Apr 2004, at 18:23, Jens wrote:

> 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
>
>
>
First of all, your problem is not well defined since the answer is not 
unique. There are obviously infinitely many ways to "find a certain 
function" in a more complicated expression. But, assuming that the 
expression you are looking for is a polynomial in your function,  in 
cases like your example it can be done with PolynomialReduce::


Last[PolynomialReduce[-1+2 x+2 E^x,f[x]-x-E^x]]


-1+2 f[x]



Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: RE: Dashing option and Plot
  • Next by Date: Re: Help: shift+enter doesn't give me any output suddenly!
  • Previous by thread: Simplify using custom function
  • Next by thread: Re: Simplify using custom function