Re: A ODE I need to solve

*To*: mathgroup at smc.vnet.net*Subject*: [mg111105] Re: A ODE I need to solve*From*: schochet123 <schochet123 at gmail.com>*Date*: Tue, 20 Jul 2010 03:44:58 -0400 (EDT)*References*: <i20q77$kh9$1@smc.vnet.net>

On Jul 19, 9:09 am, Sam Takoy <sam.ta... at yahoo.com> wrote: > Hi, > > Mathematica has a problem with this: > > DSolve[y''[x] + (2/Cosh[x - h]^2 - 1) y[x] == 0, y, x] > > although the solution is not too difficult. One of the solutions is > > 1/(Cosh[2(x-h)]+1)^(1/2) > > Is there a way to help Mathematica along? > > Thanks! Define lhs[y_] := D[y, x, x] + (2/Cosh[x - h]^2 - 1) y Then when DSolve[lhs[y[x]] == 0, y, x] doesn't yield an answer, but you know the solution 1/(Cosh[2(x-h)] +1)^(1/2) you can use the variation of parameters method DSolve[lhs[1/(Cosh[2 (x - h)] + 1)^(1/2) w[x]] == 0, w, x] which yields {{w -> Function[{x}, C[2] + C[1] (1/2 (-h + x) - 1/4 Sinh[2 (h - x)])]}} C[2]->1, C[1]->0 corresponds to the solution you already knew, and C[2]->0, C[1]->1 yields a second, linearly independent solution y[x_]=1/(Cosh[2(x-h)]+1)^(1/2) (1/2 (-h + x) - 1/4 Sinh[2 (h - x)]) Steve