Re: simple question on DSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg125012] Re: simple question on DSolve
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Fri, 17 Feb 2012 06:28:26 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201202141137.GAA17715@smc.vnet.net>
You are missing a comma in your equation list between the two boundary conditions. This eliminates the condition y'[1] == 0. Bob Hanlon On Thu, Feb 16, 2012 at 3:26 AM, Christoph Lhotka <christoph.lhotka at fundp.ac.be> wrote: > Hi, > > if I am using DSolve: > > DSolve[{y''[t] + k y[t] == 0, > y'[0] == 0 > y'[1] == 0}, {y[t]}, t] > > I get: > > {{y[t] -> C[1] Cos[Sqrt[k] t]}} > > but > > D[sol, t] /. {{t -> 0}, {t -> 1}} > > gives > > {0, -Sqrt[k] C[1] Sin[Sqrt[k]]}. > > does it mean that C[1]=0 or any other idea? > > best, > > christoph > > > > > On 02/15/2012 10:44 AM, Bob Hanlon wrote: >> eqns = {y''[x] + k*y[x] == 0, >> y'[0] == yp0, y'[1] == yp1}; >> >> sol = DSolve[eqns, y, x][[1]] // Simplify >> >> {y -> Function[{x}, (1/Sqrt[ >> k])(yp0 Cos[Sqrt[k] x] Cot[Sqrt[k]] - >> yp1 Cos[Sqrt[k] x] Csc[Sqrt[k]] + yp0 Sin[Sqrt[k] x])]} >> >> eqns /. sol // Simplify >> >> {True, True, True} >> >> y[x] /. sol /. {yp0 -> 0, yp1 -> 0} >> >> 0 >> >> Appears to be forced by boundary conditions. >> >> >> Bob Hanlon >> >> >> On Tue, Feb 14, 2012 at 6:37 AM, Gualtiero Badin >> <gualtiero.badin at gmail.com> wrote: >>> Hello, >>> if I try to solve the simple boundary value problem >>> >>> y''+ky=0 >>> y'(0)=0 >>> y'(1)=0 >>> >>> mathematica returns me y=0, that is correct but that is not the >>> complete answer... Does anyone know how to get the complete answer? >>> (of course i know the complete answer, but I would like to solve some >>> uglier versions of the same problem...) >>> Thanks
- References:
- simple question on DSolve
- From: Gualtiero Badin <gualtiero.badin@gmail.com>
- simple question on DSolve