ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 06 Apr 2020 09:26:03 +0200How to solve an ODE giving ics as y'(x1) and not y'(x0) ?https://ask.sagemath.org/question/50480/how-to-solve-an-ode-giving-ics-as-yx1-and-not-yx0/I'm tryng to solve this ODE that was made in mathematica: htt ps://i.imgur.com/9iyAcBW.jpg
As ICS we have
`u(0)=0` and `e a(L) u'(L)=P`
but in sage documentation i don't see anything to defining a point for u' different from x0 but only `ics=[x0,y(x0),y'(x0)]` or `x0,y0,x1,y1`
how to do that?
this is my code ritgh now:
e,a,p,L,a1,a2,r1,r2=var('e,a,p,L,a1,a2,r1,r2')
u=function('u')(x)
a1=pi()*r1**2
a2=pi()*r2**2
area(x)=a1+(a2-a1)*x/L
sol=desolve(e*diff(area,x)*diff(u,x)+e*area*diff(u,x,2)==0,u,ivar=x,ics=[0,0,e*area(L)*diff(u,x)(L),p])Fri, 03 Apr 2020 10:12:32 +0200https://ask.sagemath.org/question/50480/how-to-solve-an-ode-giving-ics-as-yx1-and-not-yx0/Comment by sononicola for <p>I'm tryng to solve this ODE that was made in mathematica: htt ps://i.imgur.com/9iyAcBW.jpg</p>
<p>As ICS we have
<code>u(0)=0</code> and <code>e a(L) u'(L)=P</code></p>
<p>but in sage documentation i don't see anything to defining a point for u' different from x0 but only <code>ics=[x0,y(x0),y'(x0)]</code> or <code>x0,y0,x1,y1</code></p>
<p>how to do that?
this is my code ritgh now:</p>
<pre><code>e,a,p,L,a1,a2,r1,r2=var('e,a,p,L,a1,a2,r1,r2')
u=function('u')(x)
a1=pi()*r1**2
a2=pi()*r2**2
area(x)=a1+(a2-a1)*x/L
sol=desolve(e*diff(area,x)*diff(u,x)+e*area*diff(u,x,2)==0,u,ivar=x,ics=[0,0,e*area(L)*diff(u,x)(L),p])
</code></pre>
https://ask.sagemath.org/question/50480/how-to-solve-an-ode-giving-ics-as-yx1-and-not-yx0/?comment=50571#post-id-50571No-one can help?Mon, 06 Apr 2020 09:26:03 +0200https://ask.sagemath.org/question/50480/how-to-solve-an-ode-giving-ics-as-yx1-and-not-yx0/?comment=50571#post-id-50571