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

Solving differential equation

  1. Mar 4, 2013 #1
    I have the following differential equation

    \begin{equation}
    \frac{\partial b}{\partial x}=\frac{b-c}{c^{2}}\end{equation}


    where [itex]b[/itex] and [itex]c[/itex] are both functions of [itex]x[/itex]. However, although
    I have a closed form relation between [itex]c[/itex] and [itex]x[/itex], I do not have
    such a closed form relation between [itex]b[/itex] and [itex]x[/itex]. Is there any analytic
    or numeric way to solve this problem. I want a solution linking [itex]b[/itex],
    [itex]c[/itex] and [itex]x[/itex]
     
  2. jcsd
  3. Mar 4, 2013 #2
    Well, when c(x) is a known (and integrable) function, then the ode for b(x) is a linear first order ODE and you can solve it by finding the integrating factor.
     
  4. Mar 4, 2013 #3

    I like Serena

    User Avatar
    Homework Helper

    Hi JulieK! :smile:

    Wolfram|Alpha gives this analytic solution.
    To get a nicer formula, you need a specific c(x).

    To solve numerically, the simplest method you can use is Euler's method.
    Euler's method uses that:
    $$db=\frac{b-c}{c^{2}}dx$$
    From a given ##x_0## and ##b_0##, and with a stepsize ##h##, the algorithm is:
    $$\left[ \begin{align}x_{n+1} &= x_n + h \\
    b_{n+1} &= b_n + h \frac{b_n-c(x_n)}{c(x_n)^{2}} \end{align} \right.$$

    A more advanced and accurate method is Runge-Kutta, which is described here.
     
  5. Mar 5, 2013 #4
    The formal solution is in attachment :
     

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Solving differential equation
Loading...