From: Sam Takoy on 20 Jul 2010 03:43 Hi, I have a situation where I have to simplify an expression that contains x and h, but x is given implicitly by h, so I can't explicitly eliminate it. So here's a simpler example that I'm trying and it does nothing: Assuming[x^2 + x == h, (x^2 + x)^2+h] // FullSimplify Is there a way to make this work? Thanks!
From: Bob Hanlon on 20 Jul 2010 07:55 Use the assumption directly in Simplify or FullSimplify Simplify[(x^2 + x)^2 + h, x^2 + x == h] h (h+1) FullSimplify[(x^2 + x)^2 + h, x^2 + x == h] h (h+1) Or put Simplify or FullSimplify within the scope of the Assuming construct Assuming[x^2 + x == h, Simplify[(x^2 + x)^2 + h]] h (h+1) Assuming[x^2 + x == h, FullSimplify[(x^2 + x)^2 + h]] h (h+1) Bob Hanlon ---- Sam Takoy <sam.takoy(a)yahoo.com> wrote: ============= Hi, I have a situation where I have to simplify an expression that contains x and h, but x is given implicitly by h, so I can't explicitly eliminate it. So here's a simpler example that I'm trying and it does nothing: Assuming[x^2 + x == h, (x^2 + x)^2+h] // FullSimplify Is there a way to make this work? Thanks! -- Bob Hanlon
From: Sam Takoy on 21 Jul 2010 07:11 Thanks for all this response and all that haven't showed up on the newsgroup yet. Here's my actual problem: Assuming[ a Cosh[H/(2 a)] == 1, FullSimplify[ Cosh[H/a] + 1/2 ((H/a - H/a Cosh[H/a] + 2 Sinh[H/a]) Sinh[H/(2 a)] )/( H/(2 a) Sinh[H/(2 a)] - 1/a)]] and the answer is "1"; My version of Mathematica (7) fails to do this simplification. Thanks again! On 7/20/2010 7:55 AM, Bob Hanlon wrote: > Use the assumption directly in Simplify or FullSimplify > > Simplify[(x^2 + x)^2 + h, x^2 + x == h] > > h (h+1) > > FullSimplify[(x^2 + x)^2 + h, x^2 + x == h] > > h (h+1) > > Or put Simplify or FullSimplify within the scope of the Assuming construct > > Assuming[x^2 + x == h, Simplify[(x^2 + x)^2 + h]] > > h (h+1) > > Assuming[x^2 + x == h, FullSimplify[(x^2 + x)^2 + h]] > > h (h+1) > > > Bob Hanlon > > ---- Sam Takoy<sam.takoy(a)yahoo.com> wrote: > > ============= > Hi, > > > I have a situation where I have to simplify an expression that contains > x and h, but x is given implicitly by h, so I can't explicitly eliminate > it. So here's a simpler example that I'm trying and it does nothing: > > Assuming[x^2 + x == h, (x^2 + x)^2+h] // FullSimplify > > Is there a way to make this work? > > Thanks! > > > -- > > Bob Hanlon > >
From: Murray Eisenberg on 21 Jul 2010 07:14 Try: Assuming[x^2 + x == h, Simplify[(x^2 + x)^2 + h]] Your original expression means the same thing as: FullSimplify[ Assuming[x^2 + x == h, (x^2 + x)^2+h] ] And that's clearly not what you intend, which is: Assuming[[x^2 + x == h, FullSimplify[(x^2 + x)^2 + h] ] Actually, Simplify will do nicely instead of FullSimplify here. On 7/20/2010 3:43 AM, Sam Takoy wrote: > Hi, > > > I have a situation where I have to simplify an expression that contains > x and h, but x is given implicitly by h, so I can't explicitly eliminate > it. So here's a simpler example that I'm trying and it does nothing: > > Assuming[x^2 + x == h, (x^2 + x)^2+h] // FullSimplify > > Is there a way to make this work? > > Thanks! > -- Murray Eisenberg murray(a)math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
|
Pages: 1 Prev: Very very basic question about Mathematica expressions Next: FindRoot |