kill(all)$

Elektrochemistry :appendix (integration : (sinh ,general),version 1.0)
peter.vlasschaert@gmail.com,11/03/2019

see :  info.
---------------------------------------------------------------------------------------------------
website :
=======
Elektrochemistry :appendix1 (diff(ψ,x,2) = b*sinh(ψ),version 1.0)
Elektrochemistry :appendix2 (diff(ψ,x,2) =κ^2*sinh(ψ),version 1.0)
----------------------------------------------------------------------------------------------------
book :
=====
ref :  introduction to colloid and surface chemistry
          Ducan J Shaw. (fourth edition)
----------------------------------------------------------------------------------------------------

load packages

load(lrats)$

integration : 1e) trignometric :sin
============================

p1:'integrate(sin(x),x) = integrate(sin(x),x)+c1;

p1a:'integrate(1/sin(x),x) = integrate(1/sin(x),x)+c2 ;

p1a1:lhs(p1a) = logcontract(rhs(p1a));;

logcontract(log(cos(x)-1)/2-log(cos(x)+1)/2);

p1b:'integrate(1/(sin(x))^2,x) = integrate(1/(sin(x))^2,x)+c4;

p1b1:expand(trigsimp(p1b));

definition : cot(x)
==============

p1b2:cot(x) = trigsimp(cot(x));

p1b2:subst([rhs(p1b2) = lhs(p1b2)],p1b1);

we can use same constant : because no relation here.
==============================================
{c1,c2,c3,c4}
result : next part of 'sinh'.

integration : 2e) trignometric :sinh
=============================

p2:'integrate(sinh(x),x) = integrate(sinh(x),x)+c1;

p2a:'integrate(1/sinh(x),x) = integrate(1/sinh(x),x)+c2 ;

p2a1:lhs(p2a) = logcontract(rhs(p2a));;

p2b:'integrate(1/(sinh(x))^2,x) = integrate(1/(sinh(x))^2,x)+c4;

focus on 'p2a1'  ?
=============

definition : tanh
=============

p2c1:tanh(x) = trigsimp(tanh(x));

p2c2:tanh(x)=exponentialize(tanh(x));

p2c3:subst([x=x/2],p2c2);

p2c41: expand(part(rhs(p2c3),1)*exp(x/2));

p2c42:expand(part(rhs(p2c3),2)*exp(x/2));

p2c4:lhs(p2c3) = p2c41/p2c42;

p2c5:p2a1;

use 'p2c4'  into 'p2c5'

p2c6:subst([rhs(p2c4)  = lhs(p2c4)],p2c5);

half angle : integration  :  sinh(x/2)
-----------------------------------

p2c7:'integrate(1/sinh(x/2),x) = integrate(1/sinh(x/2),x)+c5;

p2c71:rr = 2*logcontract((log(%e^(-x/2)-1)-log(%e^(-x/2)+1)))+c5;

p2c8:lhs(p2c7) = rhs(p2c71);

use : 'p2c5' , subst. x = x/2

p2c9:subst([x=x/2],p2c5);

copy : lhs , modified

p2c10:1/2*'integrate(1/sinh(x/2),x) = rhs(p2c9);

p2c11:2*p2c10;

p2c12:expand(p2c11);

p2c13:ratsimp(p2c12);

p2c14:subst([2*c2 = c5],p2c13);

with use : 'p2c6', rhs  x by  x/2
correction: *2  (reason  : see  'p2c9' and 'p2c10')

p2c15:lhs(p2c14) =expand(2* subst( [x = x/2],rhs(p2c6)));

subst :  2*c2 = c5 into 'p2c15'

final result
=========

p2c16:lhs(p2c15) = subst([2*c2 =c5],rhs(p2c15));

rem : only when  tan(x/4) < 0
-----------------------------------------------------------------------
why :  log(x), because real values needed  x > 0
-----------------------------------------------------------------------