hello ,
i am looking for obtaining a code which can do the following
given : 2nd order differential equation with a variable coefficient k
(simplest example y''+k**2 y=0)
given: 2 boundary values (eg y(0)=0 and y(2pi)=0)
given :o to 2pi int y*y dx=1 (nomalisation condition
to find : the minimum value of k for which my solution exist in the entire
interval.
is there any such code ?
i have tried to have a solution of my differential equation in terms of k
which is trivial using sympy
but m not able to add these conditions to land upto final solution . can
anyone help ?
i have tried to write a simple code for the above example which gets stuck
the moment i try to add the boundary condition ? anyone has any clue why
this is happening.
thank you
regards,
namrata
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/adf3346a-e6da-4c28-8dc5-1e5e2bc1f936%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from __future__ import division
from sympy import *
x, y, z, t = symbols('x y z t')
k, m, n ,C1 = symbols('k m n C1', integer=True)
f, g, h = symbols('f g h', cls=Function)
diffeq = Eq(f(x).diff(x, x) + k*f(x).diff(x) , 0)
solution1 = dsolve(diffeq, f(x))
print solution1
solution2= solve([k + m*exp(-k*0), k + m*exp(-k*6.28)],[k,m])
print solution2