# How can I simplify the result of a differential equation by using my own defined expressions? [duplicate]

I want to solve the following differential equation with mathematica:

 α β * w''''''[ξ] +
( 1 + α - p ) * w''''[ξ] + p/β * w''[ξ] = 0


The answer seems at first appearance really complicated.

w[ξ] ->
2 α β (-((
E^((Sqrt[-((-1 + p - α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])/(α \
β))] ξ)/Sqrt[2]) C[1])/(-1 + p - α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])) - (
E^(-((Sqrt[-((-1 + p - α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])/(α \
β))] ξ)/Sqrt[2])) C[2])/(-1 + p - α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2]) + (
E^((Sqrt[(
1 - p + α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])/(α \
β)] ξ)/Sqrt[2]) C[3])/(
1 - p + α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2]) + (
E^(-((Sqrt[(
1 - p + α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])/(α \
β)] ξ)/Sqrt[2])) C[4])/(
1 - p + α + Sqrt[
p^2 + 2 p (-1 + α) + (1 + α)^2])) +
C[5] + ξ C[6]


So now I want to simplify the result above. I am sure that the result can be simplified with some own defined expressions like:

a1 = Sqrt[p^2 + 2 p (-1 + α) + (1 + α)^2]


I have encountered similar differential equations with confusing solutions. I would really appreciate if someone could help me to solve this problem.

## marked as duplicate by Michael E2, bbgodfrey, Bob Hanlon, Jens, Mr.Wizard♦Feb 15 '15 at 22:32

• Probable duplicate: (3822) (please see the many links in my answer there) – Mr.Wizard Feb 3 '15 at 10:58
• Note that your original differential equation (which should use == rather than =) is actually a 4th order linear differential equation in v = w''. So you may want to try first simplifying the solution v[\[Xi]] of that 4th order equation before proceeding to integrate twice to come down to the original w. – murray Feb 3 '15 at 15:06

This is the right-hand part of your solution (taken from your post above):

    expr = 2 α β (-((E^((Sqrt[-((-1 + p - α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + \
α)^2])/(α β))] ξ)/Sqrt[2]) C[1])/(-1 +
p - α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + α)^2])) - \
(E^(-((Sqrt[-((-1 + p - α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + \
α)^2])/(α β))] ξ)/Sqrt[2])) C[2])/(-1 +
p - α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + α)^2]) + (E^((Sqrt[(1 -
p + α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + \
α)^2])/(α β)] ξ)/Sqrt[2]) C[3])/(1 -
p + α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + α)^2]) + (E^(-((Sqrt[(1 -
p + α +
Sqrt[p^2 +
2 p (-1 + α) + (1 + \
α)^2])/(α β)] ξ)/Sqrt[2])) C[4])/(1 -
p + α +
Sqrt[p^2 + 2 p (-1 + α) + (1 + α)^2])) +
C[5] + ξ C[6];


Try the following:

expr /. p^2 + 2 p (-1 + α) + (1 + α)^2 -> a1^2 /.
p -> 1 + Sqrt[a1^2] - b1 + α


where b1=1 + Sqrt[a1^2] - p + α. The result is somewhat more simple:

 2 α β (-((
E^((Sqrt[-((2 Sqrt[a1^2] - b1)/(α β))] ξ)/Sqrt[
2]) C[1])/(2 Sqrt[a1^2] - b1)) - (
E^(-((Sqrt[-((2 Sqrt[a1^2] - b1)/(α β))] ξ)/Sqrt[
2])) C[2])/(2 Sqrt[a1^2] - b1) + (
E^((Sqrt[b1/(α β)] ξ)/Sqrt[2]) C[3])/b1 + (
E^(-((Sqrt[b1/(α β)] ξ)/Sqrt[2])) C[4])/b1) +
C[5] + ξ C[6]


It will look much more readable, when obtained in Mma.

Have fun!