Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Variational solutions to non-linear ODE

  1. Apr 2, 2015 #1

    joshmccraney

    User Avatar
    Gold Member

    Hi PF!

    I have a system of nonlinear ODE's, wherein the only constant ##C## in the ODE takes on several values depending on the geometry; thus once a geometry is defined for the ODE, ##C## is uniquely determined. Let's say I want to guess a quadratic solution to the ODE, call it ##\phi(x)##. However, I want to adjust the coefficients of ##\phi## (since it's a quadratic) so they minimize the error of the ODE's actual solution for some range of ##C##.

    I am reading an article on how to do this, and the author seems to state that the residue equals the ODE (once set equal to zero). Then the author squares the residual and integrates it with respect to ##x## over a certain interval (0 to 1, although I'm not too concerned with this).

    The author calls this integral a functional, and then starts minimizing the functional.

    My question is, and I can be more specific if it helps, is anyone familiar with this technique? Becker 1964 originally used the technique.

    Thanks so much!

    Josh
     
    Last edited: Apr 2, 2015
  2. jcsd
  3. Apr 3, 2015 #2

    pasmith

    User Avatar
    Homework Helper

    You can certainly attempt to minimize the error for arbitrary [itex]C[/itex].

    Suppose your ODE is [tex]y'' = f(y,y')[/tex] for [itex]y : [0,1] \to \mathbb{R}[/itex] subject to given boundary conditions at 0 and 1.

    You can then look for an approximation [itex]\phi : [0,1] \to \mathbb{R}[/itex] which doesn't necessarily satisfy [itex]\phi'' - f(\phi,\phi) = 0[/itex] everywhere, but does minimize [tex]
    \int_0^1 (\phi'' - f(\phi,\phi'))^2\,dx.[/tex]

    If you are looking for a quadratic approximation then you have [itex]\phi(x) = ax^2 + bx + c[/itex]. Substituting that into the above gives you [tex]
    \int_0^1 (2a - f(ax^2 + bx + c,2ax + b))^2\,dx = G(a,b,c)[/tex] for some [itex]G[/itex]. If you require that [itex]\phi[/itex] satisfy the boundary conditions, you can eliminate two of the three unknown coefficients to be left with the problem of minimizing a function of one variable. Otherwise you have the problem of minimizing a function of three variables.
     
  4. Apr 4, 2015 #3

    joshmccraney

    User Avatar
    Gold Member

    Yes! This is exactly what I was doing. But what is there theory behind minimizing ##\int (\phi''-f)^2 \, dx##? Am I missing something?
     
  5. Apr 4, 2015 #4

    joshmccraney

    User Avatar
    Gold Member

    thanks for your reply too!
     
  6. Apr 5, 2015 #5

    pasmith

    User Avatar
    Homework Helper

    It is possible to define a norm on a suitable space of real-valued functions on [itex][0,1][/itex] whereby [tex]\|g\| = \left(\int_0^1 g(x)^2\,dx\right)^{1/2}.[/tex] By restricting [itex]\phi[/itex] to a particular subset of functions1 and minimizing [itex]\|\phi'' - f(\phi,\phi')\|[/itex] (or equivalently minimizing [itex]\|\phi'' - f(\phi,\phi')\|^2[/itex]) we obtain an approximation to the actual solution which is the "closest" approximation, in the sense that it minimizes the distance between [itex]\phi''[/itex] and [itex]f(\phi,\phi')[/itex]. Note that a solution [itex]\phi_0[/itex] of the ODE will always minimize [itex]\|\phi'' - f(\phi,\phi')\|[/itex] since then by definition [itex]\|\phi_0'' - f(\phi_0,\phi_0')\| = \|0\| = 0[/itex].

    1 Usually one restricts [itex]\phi[/itex] to a finite-dimensional subspace, but it may be that the set of functions satisfying a particular boundary condition is not a subspace.
     
  7. Apr 5, 2015 #6

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    This looks like a least squares issue, where the closest value is given by the ortho projection, using that [itex] L^2 [/itex] is a Hilbert space.
     
    Last edited: Apr 5, 2015
  8. Apr 6, 2015 #7

    joshmccraney

    User Avatar
    Gold Member

    Thank you both!
     
  9. Apr 6, 2015 #8

    WWGD

    User Avatar
    Science Advisor
    Gold Member

    pasmith did 99% of the work and I share the credit. I like it ;).
     
  10. Apr 6, 2015 #9

    joshmccraney

    User Avatar
    Gold Member

    hahahahahaha!
     
  11. Apr 9, 2015 #10

    joshmccraney

    User Avatar
    Gold Member

    Sorry to open this thread back up, but there is something I was hoping you could help me with.

    I have the following ODE and boundary conditions: ## y y'' + 2 y'^2 + x y'= 0## and ## y(1) = .00000001## and ##y'(1) = -1/2##. Also, ##y## is a function of ##x##. I'm trying to find a good quadratic fit, so I attempted to do the method described above in post 2. When doing this, I get a good solution, but when I check this solution next to the numerical solution mathematica gave me, I found if I changed the value of the last coefficient I was able to get an answer that is much closer the the numerical solution.

    Any ideas why this is?

    I can describe more if I've left anything out.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook