Message Boards Message Boards

0
|
2364 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Move prefactor inside radical

Posted 2 years ago

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]

And, is it also possible to obtain

Sqrt[  (a + b + c)^2+d^2]
POSTED BY: Steven Kaptein
2 Replies
Posted 2 years ago

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.

POSTED BY: Steven Kaptein
Posted 2 years ago

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:

simple[exp : 
   Times[sum : Plus[__], 
    Power[Plus[1, Times[Power[sum : Plus[__], -2], Power[a_, 2]]], 
     Rational[1, 2]]]] := Sqrt[sum^2 + a^2]

But that looks kinda dicey to me.

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?

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract