Re: [sage-support] Solving 4th order differential equation
Maybe (I don‘t have my pc on me right now) the “de = L*E*diff(y,x,2)==q“ is making some problems because that is also a comparing method (and so, de is True or False) El 29/05/2012 07:29, "Priyanka Kapoor" escribió: > Thanks for helping. I used a mathematical approach for 4th order > derivative i.e substituing double derivative as a variable, solving > for 2nd order differential equation and substituting back and again > solved for 2nd order differentiation. > here is code: > var('w,x,E,L,k1,k2') > y = function('y', x) > w= function('w' , x) > q = function('q', x) > assume(L>0) > assume(E>0) > q=x > de=E*L*diff(y,x,2)==q > y_res=desolve(de,y,ivar=x,ics=[L,0,0]) > des=diff(w,x,x)-y_res==0 > dess=desolve(des,w,ivar=x,ics=[0,0,0]) > print "Solution of bernoulli's equation:",dess > #Remeber plot can't be formed without giving values of > constant### > E=6 > L=10 > p=plot( 1/120*(20*L^3*x^2 - 10*L^2*x^3 + x^5)/(E*L),(x,0,1),thickness=3) > p.show() > > > > > > -- > Priyanka Kapoor > priyankacool10.wordpress.com > 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
Re: [sage-support] Solving 4th order differential equation
Thanks for helping. I used a mathematical approach for 4th order derivative i.e substituing double derivative as a variable, solving for 2nd order differential equation and substituting back and again solved for 2nd order differentiation. here is code: var('w,x,E,L,k1,k2') y = function('y', x) w= function('w' , x) q = function('q', x) assume(L>0) assume(E>0) q=x de=E*L*diff(y,x,2)==q y_res=desolve(de,y,ivar=x,ics=[L,0,0]) des=diff(w,x,x)-y_res==0 dess=desolve(des,w,ivar=x,ics=[0,0,0]) print "Solution of bernoulli's equation:",dess #Remeber plot can't be formed without giving values of constant### E=6 L=10 p=plot( 1/120*(20*L^3*x^2 - 10*L^2*x^3 + x^5)/(E*L),(x,0,1),thickness=3) p.show() -- Priyanka Kapoor priyankacool10.wordpress.com 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
Re: [sage-support] Solving 4th order differential equation
On Fri, May 25, 2012 at 5:51 AM, Priyanka Kapoor wrote: > On Fri, May 25, 2012 at 3:06 PM, David Joyner wrote: >> Did you try sympy? > > No. Does it solve 4th order diff. eq.? If yes, can you please give > link. And approach that i am using is wrong or invalid? > I googled "sympy differential equation" and got this: http://docs.sympy.org/dev/modules/mpmath/calculus/odes.html There might be better links. I just mentioned sympy because AFAIK it solved more DEs that Sage's default system (which as you point out is currently maxima). I'm not sure if it will work, just a suggestion. I'm not sure what is wrong with your code either. It seems your traceback message tells you that though. > > > -- > Priyanka Kapoor > priyankacool10.wordpress.com > 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
Re: [sage-support] Solving 4th order differential equation
On Fri, May 25, 2012 at 3:06 PM, David Joyner wrote: > Did you try sympy? No. Does it solve 4th order diff. eq.? If yes, can you please give link. And approach that i am using is wrong or invalid? -- Priyanka Kapoor priyankacool10.wordpress.com 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
Re: [sage-support] Solving 4th order differential equation
Did you try sympy? On Friday, May 25, 2012, Priyanka Kapoor wrote: > I want to know how to solve fourth order differential equation in > sagemath. Question which i actually want to solve is Euler-bernoulli > equation. >http://en.wikipedia.org/wiki/Euler%E2%80%93Bernoulli_beam_theory > I searched a lot about solving this, but didn't succeed. Does anyone > know how to solve this equation. Whether this equation is solved in > parts by taking second order derivative two times or directly. > Please give any link that shows wonderful working of sagemath > regarding 4th order differential equation. I tried this: > > var('k1,k2') > y=function('y',x) > w=function('w',x) > q=function('q',x) > var('x') > de=diff(y,x,x)==q ##here i put (d^2/dx^2)(w)=y , thus (d^4/dx^4)(w)= > (d^2/dx^2)(y) > res=desolve(de,dvar=y,ivar=x) > e=diff(w,x,x)-res==0 > res1=desolve(res,dvar=w,ivar=x,contrib_ode=True) ## As solution of > above will give y and again i put y= (d^2/dx^2)(w) i.e substitute back > print res1 > print res > > NotImplementedError: Maxima was unable to solve this ODE. > > Please help. > > > > > -- > Priyanka Kapoor > priyankacool10.wordpress.com > 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