Re: DSolve Question

• To: mathgroup at smc.vnet.net
• Subject: [mg50600] Re: [mg50589] DSolve Question
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sun, 12 Sep 2004 04:42:11 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

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

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

Table[(y[t] /. DSolve[{eq1,initial},y[t],t][[1,1]]) ,
{v0,0,2, 1/2}] // ColumnForm

y0*Cos[t*w]
(2*w*y0*Cos[t*w] + Sin[t*w])/(2*w)
(w*y0*Cos[t*w] + Sin[t*w])/w
(2*w*y0*Cos[t*w] + 3*Sin[t*w])/(2*w)
(w*y0*Cos[t*w] + 2*Sin[t*w])/w

This leads to the supposition that

supp = y[t] -> (w*y0*Cos[t*w]+v0*Sin[t*w])/w;

Verifying that this satisfies both the equation and the initial conditions

Simplify[eq1 /. NestList[D[#,t]&,supp,2]]

True

initial == Drop[Equal@@#& /@
Simplify[NestList[D[#,t]&,supp,2] ,t==0],-1]

True

Bob Hanlon

>
> From: "John Reed" <nospamjreed at alum.mit.edu>
To: mathgroup at smc.vnet.net
> Date: 2004/09/11 Sat AM 06:44:49 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg50600] [mg50589] DSolve Question
>
> 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
>
>

```

• Prev by Date: Re: Re: Log[4]==2*Log[2]
• Next by Date: Re: Trying to eliminate a loop
• Previous by thread: Re: DSolve Question
• Next by thread: Evaluating integral for magnetic field intensity using mathematica