Given: int x / ( sinh(x) + cosh(x) ) dx
Multiply the integrand by 1 in the form of (sinh(x)-cosh(x))/(sinh(x)-cosh(x)):
int x / ( sinh(x) + cosh(x) ) dx = int x / ( sinh(x) + cosh(x) )(sinh(x)-cosh(x))/(sinh(x)-cosh(x)) dx
The denominator is multiplied using the difference of two squares pattern and the numerator is multiplied using the distributive property:
int x / ( sinh(x) + cosh(x) ) dx = int (xsinh(x)-xcosh(x)) / ( sinh^2(x) - cosh^2(x)) dx
The identity cosh^2(x)- sinh^2(x)=1 tells us that the denominator is -1:
int x / ( sinh(x) + cosh(x) ) dx = int (xsinh(x)-xcosh(x)) / -1 dx
Eliminate the denominator by changing signs in the numerator:
int x / ( sinh(x) + cosh(x) ) dx = int xcosh(x)-xsinh(x) dx
Separate into two integrals:
int x / ( sinh(x) + cosh(x) ) dx = int xcosh(x) dx- int xsinh(x) dx
Both integrals are trivial integrations by parts:
int x / ( sinh(x) + cosh(x) ) dx = (xsinh(x) - cosh(x)) - (xcosh(x)-sinh(x))+C
Regroup:
int x / ( sinh(x) + cosh(x) ) dx = xsinh(x)- xcosh(x)+ sinh(x)- cosh(x) +C