|
[Date Index]
[Thread Index]
[Author Index]
Re: Extract a part of expression
- To: mathgroup at smc.vnet.net
- Subject: [mg124373] Re: Extract a part of expression
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Tue, 17 Jan 2012 05:59:59 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201201162207.RAA15301@smc.vnet.net>
expr = HoldForm[(x^2 Cos[x] (Sin[2 x] Tan[x]))/(E^x*x*Csc[x]^2)];
expr /. x_/y_ -> x // ReleaseHold
x^2*Sin[x]*Sin[2*x]
expr /. x_/y_ -> y // ReleaseHold
E^x*x*Csc[x]^2
Bob Hanlon
On Mon, Jan 16, 2012 at 5:07 PM, Miguel Gil <misvrne at gmail.com> wrote:
> How I can extract the full numerator (or denominator) of an expression of the form g (x) / w (x)?.
> I tried to do with Numerator [expr], but returns a wrong result. I tried with the attribute HoldForm [expr] and can not get the correct result.
>
> For example:
> expr = (x ^ 2 Cos [x] (Sin [2x], Tan [x ]))/( E ^ x * x * Csc [x] ^ 2)
>
Prev by Date:
Re: Is there any efficient easy way to compare two lists with the same length with Mathematica?
Next by Date:
Re: plotting histograms with do loop
Previous by thread:
Re: Extract a part of expression
Next by thread:
Question about DeleteCases to remove list elements based on first character
|