Re: simple question on DSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg124972] Re: simple question on DSolve
- From: Barrie Stokes <Barrie.Stokes at newcastle.edu.au>
- Date: Wed, 15 Feb 2012 04:42:06 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201202141137.GAA17715@smc.vnet.net>
Hi Gualtiero It's always helpful to see your code - there's many a slip between cup and lip. If someone had shown me this before I saw your email, I wouldn't have suspected anything was wrong. BTW, I am *no* DE guru at all (hence my somewhat pedestrian code below); my last DE text book was "Differential Equations" by Ralph Palmer Agnew, 2nd Ed., 1960. (I wonder what he would have thought of Mathematica. There's a very nice obit at http://ecommons.cornell.edu/bitstream/1813/19237/1/Agnew_Ralph_Palmer_1986.pdf) In[1]:= ClearAll[ a, b, x, y, z ] In[2]:= sol00 = DSolve[ {y''[x] + k y[x] == 0, y'[0] == 0, y'[1] == 0}, y[x], x] // First Out[2]= {y[x] -> 0} In[3]:= sola0 = DSolve[ {y''[x] + k y[x] == 0, y'[0] == a, y'[1] == 0}, y[x], x] // First // Simplify Out[3]= {y[x] -> (a Cos[Sqrt[k] (-1 + x)] Csc[Sqrt[k]])/Sqrt[k]} In[4]:= Limit[ y[x] /. sola0, a -> 0 ] // Simplify Out[4]= 0 In[5]:= sol0b = DSolve[ {y''[x] + k y[x] == 0, y'[0] == 0, y'[1] == b}, y[x], x] // First // Simplify Out[5]= {y[x] -> -((b Cos[Sqrt[k] x] Csc[Sqrt[k]])/Sqrt[k])} In[6]:= Limit[ y[x] /. sol0b, b -> 0 ] // Simplify Out[6]= 0 In[7]:= solab = DSolve[ {y''[x] + k y[x] == 0, y'[0] == a, y'[1] == b}, y[x], x] // First // Simplify Out[7]= {y[ x] -> ((a Cos[Sqrt[k] (-1 + x)] - b Cos[Sqrt[k] x]) Csc[Sqrt[k]])/ Sqrt[k]} In[8]:= Limit[ y[x] /. solab, b -> 0 ] // Simplify Out[8]= (a Cos[Sqrt[k] (-1 + x)] Csc[Sqrt[k]])/Sqrt[k] In[9]:= Limit[ y[x] /. solab, a -> 0 ] // Simplify Out[9]= -((b Cos[Sqrt[k] x] Csc[Sqrt[k]])/Sqrt[k]) I hope this helps. Cheers Barrie >>> On 14/02/2012 at 10:37 pm, in message <201202141137.GAA17715 at smc.vnet.net>, 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