2

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 ?

Bilal
  • 21
  • 1
  • 3

1 Answers1

12

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)
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • Same with 9.01 (automatic simplification) – eldo Jun 04 '14 at 11:18
  • I want to take a common factor Sqrt[A] from an expression like: Sqrt[A^5]+5Sqrt[A^3]-Sqrt[A], and the result should be simplified as : (A^2+5A-1)Sqrt[A]. – Bilal Jun 05 '14 at 19:37
  • @Bilal The methods I showed will work. See my update. – Mr.Wizard Jun 06 '14 at 01: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 07 '14 at 06:30
  • @Bilal Please include that example and the output you desire in your question. – Mr.Wizard Jun 07 '14 at 07:17