For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > November 2007 > Solving Tanh[x]=Tanh[a]Tanh[b x + c]









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Solving Tanh[x]=Tanh[a]Tanh[b x + c]
Yaroslav Bulatov

2007-11-20, 4:29 am

I'd like to use Mathematica to show that solution of Tanh[x] - Tanh[a]
Tanh[b x + c]=0 can be written as
1/2 Log (Root[c1 x^(1+b) + c2 x^b + c3 x -1]) for certain coefficients
c1,c2,c3 when b is a positive integer

Tanh[x] - Tanh[a] Tanh[b x + c]// TrigToExp // Together // Numerator
gives me almost what I need, except now I need to factor out Exp[2x]
as a separate variable. What's the best way of achieving it? Using
syntactic replacement rules like {Exp[a_+b_]->Exp[a]Exp[b],Exp[2x]->x}
seems like an uphill battle against the evaluator which automatically
simplifies Exp expressions

Yaroslav

dh

2007-11-22, 4:40 am



Hi Yaroslav,

you must prevent the "uphill battle" by e.g. temporarily write

Exp[a]Exp[b] as {Exp[a],Exp[b]}, then do what you want and finally

eliminate the braces.E.g:

.... //.{Exp[a__+b_]->{Exp[a],Exp[b]},Exp[2x]->x,{a_,b_}->a b}

hope this helps, Daniel





Yaroslav Bulatov wrote:

> I'd like to use Mathematica to show that solution of Tanh[x] - Tanh[a]


> Tanh[b x + c]=0 can be written as


> 1/2 Log (Root[c1 x^(1+b) + c2 x^b + c3 x -1]) for certain coefficients


> c1,c2,c3 when b is a positive integer


>


> Tanh[x] - Tanh[a] Tanh[b x + c]// TrigToExp // Together // Numerator


> gives me almost what I need, except now I need to factor out Exp[2x]


> as a separate variable. What's the best way of achieving it? Using


> syntactic replacement rules like {Exp[a_+b_]->Exp[a]Exp[b],Exp[2x]->x}


> seems like an uphill battle against the evaluator which automatically


> simplifies Exp expressions


>


> Yaroslav


>




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com