Re: DSolve Question

• To: mathgroup at smc.vnet.net
• Subject: [mg50602] Re: [mg50589] DSolve Question
• From: Selwyn Hollis <sh2.7183 at misspelled.erthlink.net>
• Date: Sun, 12 Sep 2004 04:42:13 -0400 (EDT)
• References: <200409111044.GAA19893@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On Sep 11, 2004, at 6:44 AM, John Reed wrote:

> I'm relatively new to Mathematica, and I'm having trouble with a
> simple DE.
> This is from Zimmerman & Olness, "Mathematica for Physics".  Here's the
> equation:
>
> eq1 = y''[t] + w^2 y[t] == 0
>
> initial = {y[0] == y0, y'[0] == v0}
>
> eq3 = DSolve[{eq1, initial}, y[t], t]
>
> When this executes, I get the error message bvnul: For some branches
> of the
> general solution, the given boundary conditions lead to an empty
> solution.
>
> Now, if I change v0 to a number, everything works fine.  I've tried
> making
> v0 real and positive, but with no luck.
>
> Any help is appreciated.
>
> John Reed

Hi John,

You've rediscovered a "bug" in DSolve that's new in 5.0. Here's one
workaround:

eq1 = y''[t] + w^2 y[t] == 0

initial = {y[0] == y0, y'[0] == v0}

soln[t_] = y[t] /. First@DSolve[eq1, y[t], t]

soln[t] /. First@Solve[initial /. y -> soln, {C[1], C[2]}]

-----
Selwyn Hollis
http://www.appliedsymbols.com