Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

If I simplify an equation like Sqrt[A^5]+5*Sqrt[A^3]-Sqrt[A] then I get (A^2+5A-1)*Sqrt[A] with no problems. But when I need to simplify Sqrt[(A^5) (1 + a) ] + 5 Sqrt[A^3 (1 + a)] - Sqrt[A (1 + a)] as (A^2+5A-1)Sqrt[A (1 + a)], I get the original one:

Sqrt[(A^5) (1 + a) ] + 5 Sqrt[A^3 (1 + a)] - Sqrt[A (1 + a)]

I tried Simplify, FullSimplify, Expand, Factor, but they all return the original equation. What is going on behind the scenes ?

share|improve this question

1 Answer 1

I believe there are three issues here.

  1. Your expressions are not generally equivalent. You must specify assumptions that make them so.

  2. The form A*Sqrt[A] is automatically transformed into A^(3/2). To get your desired output you will need to Hold the expression.

  3. If attempting to use (Full)Simplify you will need to specify a ComplexityFunction that sees your desired form as simpler, e.g. How can I simplify $\log(512)$ to $9\log(2)$?. (See also Using Hold correctly with Simplify and ComplexityFunction if you choose this more difficult route.)

The assumption can be given to Simplify:

Simplify[Sqrt[(A^3)], A > 0]

A^(3/2)

Or you can in this case use PowerExpand:

PowerExpand converts (a b)^c to a^cb^c, whatever the form of c is.

The transformations made by PowerExpand are correct in general only if c is an integer or a and b are positive real numbers.

Sqrt[(A^3)] // PowerExpand
A^(3/2)

Since the form A*Sqrt[A] requires holding, perhaps it is best as a formatting operation:

Unprotect[Power];
Format[x_^(3/2)] := Defer[x*Sqrt[x]]
Protect[Power];

Now:

A^(3/2)
A Sqrt[A]

Addressing your updated question you can use methods above exactly as illustrated:

expr = Sqrt[A^5] + 5*Sqrt[A^3] - Sqrt[A];

Simplify[expr, A > 0]
Sqrt[A] (-1 + 5 A + A^2)
expr // PowerExpand // Simplify
Sqrt[A] (-1 + 5 A + A^2)
share|improve this answer
    
Same with 9.01 (automatic simplification) –  eldo Jun 4 at 11:18
    
I want to take a common factor Sqrt[A] from an expression like: Sqrt[A^5]+5*Sqrt[A^3]-Sqrt[A], and the result should be simplified as : (A^2+5A-1)*Sqrt[A]. –  Bilal Jun 5 at 19:37
    
@Bilal The methods I showed will work. See my update. –  Mr.Wizard Jun 6 at 1:16
    
Thanks for your replies, yes you are right,they work in this example, but in my case it is not working , I want to simplify Sqrt[(A^5) (1 + a) ] + 5 Sqrt[A^3 (1 + a)] - Sqrt[A (1 + a)] as (A^2+5A-1)Sqrt[A (1 + a)] –  Bilal Jun 7 at 6:30
    
@Bilal Please include that example and the output you desire in your question. –  Mr.Wizard Jun 7 at 7:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.