Re: newbie: diff equation
- To: mathgroup at smc.vnet.net
- Subject: [mg96907] Re: [mg96886] newbie: diff equation
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Fri, 27 Feb 2009 06:10:53 -0500 (EST)
- References: <200902261301.IAA26650@smc.vnet.net>
- Reply-to: drmajorbob at bigfoot.com
You're asking DSolve to do its own work and the work of Solve, at the same time. Try it with fewer conditions: DSolve[f''[x] == -m^2 f[x], f, x] {{f -> Function[{x}, C[1] Cos[m x] + C[2] Sin[m x]]}} or Clear[f] f[x_] = f[x] /. Last@DSolve[f''[x] == -m^2 f[x], f, x]; Reduce[{f[0] == 0, f[Pi] == 0}, {C[0], C[1], m}] (C[3] \[Element] Integers && ((C[2] != 0 && C[1] == 0 && m == 2 C[3]) || (C[1] == 0 && m == 1 + 2 C[3]))) || ((-\[Pi] + m \[Pi])/(2 \[Pi]) \[NotElement] Integers && C[2] == 0 && C[1] == 0) or Clear[f] f[x_] = f[x] /. Last@DSolve[{f''[x] == -m^2 f[x], f[0] == 0}, f[x], x] Reduce[f[Pi] == 0, {m}] // Simplify C[2] Sin[m x] (C[1] \[Element] Integers && (m == 2 C[1] || m == 1 + 2 C[1])) || C[2] == 0 Unless C[2] == 0, that works out to mean "m is an integer", but... as you can see... Mathematica somehow isn't able to straightforwardly say so. Bobby On Thu, 26 Feb 2009 07:01:18 -0600, Mike <atkins1976 at yahoo.com> wrote: > My problem is very simple, I'm sure someone can help me out quickly. I > am trying to solve some systems of differential equations a bit like a > particle in a box (QM) so I started with this basic problem which I know > how to solve just to make sure I am entering everything ok, but I can't > even get it to work. > > I want to solve f''[x]= - m^2 f[x] > > with f[0] = 0 and f[Pi] = 0 > > this is obviously only solvable with the condition on m being integer > but if I do DSolve on the above with the boundary conditions I just get > f=0. How can I get mathematica to solve this and give me the conditions > on m? I need to solve much more general problems of this type. I hope > someone can help. > Many thanks > -- DrMajorBob at bigfoot.com
- References:
- newbie: diff equation
- From: Mike <atkins1976@yahoo.com>
- newbie: diff equation