sqrt(a^2+2*a+1) can be easily rewritten as |a+1|. I would like to do this in maxima, however cannot make it work. Although sqrt(a^2) is automatically simplified to |a|, sqrt(a^2+2*a+1) is not. And radcan(sqrt(a^2+2*a+1)) give a+1, which is incorrect. Is there anyway to get the right simplification in Maxima?
sqrt(a^2+2*a+1) can be easily rewritten as |a+1| . I would like to do this
Share
Yep. Basically, you just have to tell Maxima to try a bit harder to factorise the inside of the square root. For example:
The
maphere means that the functionfactorshould be applied to each of the arguments ofsqrt. What happens is that you getsqrt((a+1)^2)appear on the way, and this is automatically simplified toabs(a+1).Note that the answer from
radcanis correct for some values ofa. As I understand it, this is all thatradcanguarantees: it’s useful for answering “Yikes! Is there a simpler way to think about this crazy expression?”, but not particularly helpful for “Hmm, I’m not sure what the variables in this are. Is there a simpler form?”