Solving differential equation

In summary, the conversation discusses a differential equation involving the functions b and c of x. Although there is a closed form relation between c and x, there is not one for b and x. The person is looking for a solution that links all three variables. An analytic solution can be found when c(x) is known and integrable, while a specific c(x) is needed for a nicer formula. For numerical solutions, Euler's method and Runge-Kutta are suggested as options. The formal solution is also provided in an attachment.
  • #1
50
0
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]
 
Physics news on Phys.org
  • #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.
 
  • #3
JulieK said:
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]

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.
 
  • #4
The formal solution is in attachment :
 

Attachments

  • EDOlin.JPG
    EDOlin.JPG
    8.5 KB · Views: 385

Suggested for: Solving differential equation

Replies
2
Views
491
Replies
1
Views
750
Replies
12
Views
2K
Replies
3
Views
1K
Replies
3
Views
747
Replies
3
Views
2K
Replies
5
Views
507
Replies
17
Views
408
Back
Top