Dear community, I am trying to move a prefactor, inside a radical to simplify an expression. It works when the radical is comprised of one or two terms, but for three or more it does not seem to work anymore:
Simplify[a Sqrt[1 + b^2/a^2], a > 0]
Simplify[(a + b) Sqrt[1 + c^2/(a + b)^2], (a + b) > 0]
Simplify[(a + b + c) Sqrt[1 + d^2/(a + b + c)^2], (a + b + c) > 0]
Gives
Sqrt[a^2 + b^2]
Sqrt[a^2 + 2 a b + b^2 + c^2]
(a + b + c) Sqrt[1 + d^2/(a + b + c)^2]
How to obtain
Sqrt[ a^2 + 2 a b + b^2 + 2 a c + 2 b c + c^2 + d^2]
If you’re wanting to tweak how Simplify works, you might look into TransformationFunctions, which is an option to Simplify.
If you’re asking if there is any other function you could use to produce the exact output you want, then I don’t know, it’s certainly possible. You could also write one yourself, maybe something like:
But my biggest question is “what is your objective”? You already have an understanding of the expressions you’re dealing with, so why are you even bothering with Simplify? If it’s for output, then just write your own string-ify-ing function.
Also, The idea of simple can be subjective. How does Mathematica know what you consider simple? The fact that you want two different outputs sort of makes the point here. For each usage, you’re going to need to decide what your preferred simplification is. But if you already know how the simplification should look, then why not just start with the expression you want?
Hi Eric, thank you for your reply. I will give this a try. To answer your biggest question: I am studying the solution of a diffusion equation. You can put this solution under various forms (i.e. complex form, wave-form, amplitude-phase form, etc…). Without entering into too much detail about why, I am trying to understand if I can force Mathematica to display the solution under the form I want, and the (a + b + c) Sqrt[1 + d^2/(a + b + c)^2] expression is part of it.