Re: DSolve Question
- To: mathgroup at smc.vnet.net
- Subject: [mg50646] Re: DSolve Question
- From: Kevin <kmccann at umbc.edu>
- Date: Wed, 15 Sep 2004 01:50:12 -0400 (EDT)
- Organization: University of Maryland, Baltimore County
- References: <200409111044.GAA19893@smc.vnet.net> <ci12e0$1e5$1@smc.vnet.net> <ci3ehj$e3f$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
It's not a bug, it is a format problem. This works: eq1 = {y''[t] + w2 y[t] == 0} initial = {y[0] == y0, y'[0] == v0} DSolve[Join[eq1, initial], y[t], t] Note the brackets on the DE. The format is DSolve[{deqn,ic},var,indvar] You had DSolve[eq1,{...},var,indvar] I guess Mathematica didn't like it. Kevin John Reed wrote: > Thanks for bringing up the bug suggestion. There is documentation about > this problem on the Mathematica site at: > > http://support.wolfram.com/mathematica/mathematics/equations/dsolveproblem.html > > I was able to solve the problem using this method. > > John Reed > > "Selwyn Hollis" <sh2.7183 at misspelled.erthlink.net> wrote in message > news:ci12e0$1e5$1 at smc.vnet.net... > >>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 >>(edit reply-to to reply) >> > >
- References:
- DSolve Question
- From: "John Reed" <nospamjreed@alum.mit.edu>
- DSolve Question