Violence is the way to combat Muslim extremists. This group cannot and will not negotiate, nor should governments. While the battle is for the hearts and minds of the moderate Muslims, a rational discussion cannot occur with those that kidnap and behead people, such as those that beheaded a hostage in the Philippines.
Violence is a terrible way to solve issues. It is what the terrorists want to happen. However, I cannot think of another solution that does not involve some level of military action. You can continue to condone their actions, but you still have to protect the citizens and actively prevent attacks.
Philippine President Rodrigo Duterte ordered the destruction of Muslim extremists, due to their violent acts of beheading a hostage. However, if you look back through history, the answer that violence always gives is simply more violence. Violence is like a fire you can either feed it with fuel and continue to let it burn, hoping that one day it will stop or you can starve it by not giving it the breath it needs and watch it die.
Muslim extremists are always looking for a way to make what they do seem okay, and pointing to violence on the other side gives them firepower for recruiting. The best way to fight extremists is to act exactly the opposite of the way they act, so potential recruits can see that there is a good side for them to stick on.