Results 1 to 4 of 4

Math Help - the general solution to a first order ODE

  1. #1
    Newbie
    Joined
    Mar 2010
    Posts
    1

    the general solution to a first order ODE

    I have a ODE shown as below:
    m(dx/dt)=ax-b(dx/dt)+c(integrate (dx/dr)/((t-r)^(1/2)) (0,t))

    in which m, a, b and c are constants, and the part
    integrate (dx/dr)/((t-r)^(1/2)) (0,t) means the integration of the expression

    (dx/dr)/((t-r)^(1/2)) with respect to r, from 0 to t.
    The rest parts of the equation is OK to handle; it is just this integration.

    Thanks~
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Hi. Never seen one like that before. Looks like it's:

    k\frac{dx}{dt}=ax+c\int_0^t \left(\frac{d}{dr}x(r)\right) \frac{1}{\sqrt{t-r}}dr

    First thing I notice is the integral is in the form of a convolution:

    \mathcal{L}\left\{\int_0^t F(r)G(t-r)dr\right\}=f(s)g(s)

    where f(s) and g(s) are the Laplace Transforms of F(r) and G(r). So I do that in desperation cus' I don't know what else to do and I end up with the expression:

    \mathcal{L}^{-1}\left\{\frac{kx_0-c x_0 \sqrt{\pi/s}}{ks-a-c\sqrt{\pi s}}\right\}

    which Mathematica can't invert so then I consider:

    \mathcal{L}^{-1}\left\{\frac{kx_0-c x_0 \sqrt{\pi/s}}{ks-a-c\sqrt{\pi s}}\right\}=\frac{1}{2\pi i}\mathop\int\limits_{c-i\infty}^{c+i\infty} \frac{kx_0-c x_0 \sqrt{\pi/s}}{ks-a-c\sqrt{\pi s}}e^{st}ds

    or just for now, collapse it down to:

    \mathop\int\limits_{c-i\infty}^{c+i\infty} \frac{1- \sqrt{\pi/s}}{s-1-\sqrt{\pi s}}e^{st}ds

    That's an interesting contour integral to evaluate (if it converges), probably with a slit along the real axis from (-\infty,0] with an indentation around the origin.

    There was a thread here of late about "exploring mathematics". Yeah, this is where I'd be heading.

    Maybe though there is an easier way.
    Last edited by shawsend; March 11th 2010 at 10:35 AM. Reason: No branch cut at pole
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    Joined
    Aug 2008
    Posts
    903
    I've made some progress which gives me some encouragement the inverse transform is convergent. The code below numerically integrates the Bromwich integral with all parameters equal to one including the initial condition x(0)=1 and since the imaginary component is odd and the real even (by just plotting them), I just multiply the real part by 2 (but the 2i cancel) and integrate from s=6+0i to s=6+500i (since the pole in the denominator is at about 4.9) for t in the range of (0,1). I then fit the data to a 10-degree polynomial and then back-substitute that polynomial into the IDE and then compare plots of the left and right side of the equation by superimposing them. The plot below shows at least in this range, good agreement.

    Code:
    u[s_] := (1 - Sqrt[Pi/s])/(s - 1 - Sqrt[Pi*s]); 
    myTable = Table[{tval, (1/Pi)*Re[NIntegrate[u[s]*Exp[s*t] /. 
             {t -> tval, s -> 6 + I*y}, {y, 0, 500}]]}, {tval, 0.01, 1, 0.05}]; 
    g[t_] = Sum[Subscript[a, n]*t^n, {n, 0, 10}]
    theCoeff = Table[Subscript[a, n], {n, 0, 10}]
    mycoef = FindFit[myTable, g[t], theCoeff, t]
    mysol[t_] := g[t] /. mycoef; 
    leftside = D[mysol[t], t]
    rightside = mysol[t] + Integrate[D[mysol[r], r]*(1/Sqrt[t - r]), {r, 0, t}, 
        Assumptions -> t > 0]
    left = Plot[leftside, {t, 0, 1}, PlotStyle -> Blue]
    right = Plot[rightside, {t, 0, 1}, PlotStyle -> Red]
    Show[{left, right}]
    Attached Thumbnails Attached Thumbnails the general solution to a first order ODE-ide-solution.jpg  
    Last edited by shawsend; March 11th 2010 at 10:15 AM. Reason: minor corrections
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Aug 2008
    Posts
    903
    So I use the contour below and we're looking for the purple path so that for the IVP:

    k\frac{dx}{dt}=a x+c\int_0^t \left(\frac{d}{dr}x(r)\right) \frac{1}{\sqrt{t-r}}dr,\quad x(0)=x_0,\quad t\geq 0

    arrive at the general solution:

    x(t)=\sum_{n=1}^N\mathop\text{Res}\limits_{s=s_n}\  left(\frac{x_0(k-c\sqrt{\pi/s}}{k s-a-c\sqrt{\pi s}}e^{st}\right)+\frac{a c x_0}{\sqrt{\pi}}\int_0^{\infty}\frac{1}{\sqrt{r}\l  eft[a^2+2 ak r+r(c^2\pi+k^2r)\right]}e^{-rt}dr

    where the sum is over the number of poles (0,1, or 2) that lie in the contour. I haven't rigorously checked it but it does give good numerical agreement when test cases are back-substituted into the IDE.
    Attached Thumbnails Attached Thumbnails the general solution to a first order ODE-modified-bromwich-contour.jpg  
    Last edited by shawsend; March 14th 2010 at 06:27 AM. Reason: added sum of residues to solution
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. General solution to 2nd order
    Posted in the Differential Equations Forum
    Replies: 6
    Last Post: October 8th 2010, 11:36 AM
  2. General Solution to Second Order Differntial Eq
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: May 8th 2010, 03:47 PM
  3. General Solution 2nd order
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: May 5th 2010, 04:26 PM
  4. n-th order ODE, general solution?
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: February 10th 2010, 05:04 PM
  5. 2nd order PDE- general solution
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: November 9th 2009, 09:02 AM

Search Tags


/mathhelpforum @mathhelpforum