Search code examples
maple

Maple basic: transform the maple results


I was running diff(abs(2*x + 5), x), maple gives me an answer of 2*abs(1, 2*x + 5)

I actually dont know what that means. But I know the answer is (4*x + 10)/abs(2*x + 5). How could I transform the answer from 2*abs(1, 2*x + 5) to (4*x + 10)/abs(2*x + 5)

Thanks for the help.


Solution

  • diff(abs(2*x + 5), x) assuming x::real;
    
                      /    5\
              2 signum|x + -|
                      \    2/
    
    ans1 := normal(convert(%,abs));
    
                     2 x + 5
             ans1 := -------
                     |    5|
                     |x + -|
                     |    2| 
    
    ans2 := (4*x + 10)/abs(2*x + 5);
    
                     4 x + 10 
             ans2 := ---------
                     |2 x + 5|
    
    combine(normal(convert(ans1-ans2, signum)));
    
                     0
    

    The meaning of abs(1,x) is described on the Help page for the abs command.