Hi Priyanka,

I would first define well the problem and the equation (you have terms like
c, and d that you are not using). It seems like you are trying to solve the
equation of a undampened string with a constant attached to it.

I would do it like this:


x = var('x') # independent variable
b =  var('b')   # constant

y = function('y', x) # unknown function

# define 2nd order ODE; (undampened spring with unit of mass attached)
myode = diff(y,x,2)+b*y == 0 # define 2order ODE

assume(b>0) # mass is always possitive

f = desolve_laplace(de = myode,dvar = y, ivar=x)

I should return an expression like:

cos(sqrt(b)*x)*y(0) + sin(sqrt(b)*x)*D[0](y)(0)/sqrt(b)


Best

Jose


On 10 May 2012 13:05, Priyanka Kapoor <anjalicool.kapoor...@gmail.com>wrote:

> Can anyone help me out in this question?
>
> x,a,c,d=var('x,b,c,d')
> y = function('y', x)
> de=diff(y,x,x)+b*y==0
> c=desolve(de,y,ivar=x)
> print c
>
>
>
> --
> Priyanka Kapoor
> http://kapoorpriyanka.in
> Linux User Group, Ludhiana
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to