Linear first order differential equation with unknown function

Click For Summary

Discussion Overview

The discussion revolves around solving a linear first-order differential equation of the form f'(x) + (1/(x-20)) * f(x) = (1/(x-20)) * g(x). Participants explore methods for obtaining numerical values for f(x) given specific values of g(x) at various points, as well as the implications of choosing integration limits in the context of numerical integration.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about the possibility of obtaining specific numerical values for f(x) from the given differential equation and numerical values for g(x).
  • Another participant suggests using an integrating factor, u(x) = x - 20, to solve the differential equation and provides a formula for f(x) involving an integral of g(t).
  • A participant expresses confusion about how to appropriately choose the lower limit of integration, particularly in relation to the values of g(x) and f(x) they have.
  • It is noted that the choice of the lower limit corresponds to an arbitrary constant of integration, and specifying a value for f at some x_0 is necessary for a unique solution.
  • Concerns are raised about the accuracy of numerical approximations for f(x) at different points, particularly regarding the behavior of approximations as one moves away from the starting point.
  • One participant questions whether using multiple points should uniformly increase accuracy for all approximations or if oscillation in results could occur based on the choice of starting point.

Areas of Agreement / Disagreement

Participants express varying levels of understanding and confusion regarding the integration process and the implications of choosing limits. There is no consensus on the best approach to selecting the lower limit of integration or the behavior of numerical approximations across different points.

Contextual Notes

Participants discuss the potential singularity at x = 20 and the need for careful selection of integration limits to avoid issues in the numerical solution. The discussion also highlights the dependence of accuracy on the choice of starting points and the distribution of known values.

DMT69
Messages
11
Reaction score
0
I was wondering if there is a way to get specific numerical values for the following differential equation:

f'(x)+ \frac{1}{x-20}\cdot f(x)=\frac{1}{x-20}\cdot g(x)

I have numerical values for g(x) for about 10 different x values. I need to find f(x) numerically for those same values.

Is this even possible from this information?
 
Physics news on Phys.org
The simplest thing to do is to find the "integrating factor".

That is, you want a function u(x) such that
\frac{d(uf)}{dx}= uf'+ u'f= uf'+ \frac{u}{x- 20}f

Clearly, that requires that u'= \frac{u}{x- 20}
\frac{du}{u}= \frac{dx}{x- 20}
ln(u)= ln(x- 20)+ C
u= c(x- 20)

Since we only need one such function, we can take c= 1. The integrating factor is u= x- 20.

Multiplying both sides of the equation by x- 20, we have
((x- 20)f)'= g(x)

So that (x- 20)f= \int_a^x g(t)dt where the choice of a gives the "constant of integration".

The solution, then, is f(x)= \frac{1}{x- 20}\int_a^x g(t) dt

Use the values for g(x) that you are given to do a numerical integral.
 
Thanks, I'll give that a try
 
Okay, I've been reading up on numerical integration, and I have a fair handle on that part. And I am able to follow how you solved the differential equation. But there is one thing that I am still confused about, and this is maybe more a general misunderstanding on my part for differential equation solutions.

It has to do with the lower limit "a" of the integration. How is this chosen appropriately for a practical situation?

Say, for example, I have some values g(x_0), g(x_1) ... g(x_n) and I would like good approximations for f(x_0), f(x_1) ... f(x_n), how would I choose the lower limit of integration in these cases (I assume the upper limit is the value of f(x) I am trying to approximate).

If it helps, I have values for f(20), which is the same as g(20) in all cases. In all cases (I have a bunch of similar cases to calculate) the values I have are for x = {20,50,100,140,200,250,300,350,400,450,500}
 
DMT69 said:
Okay, I've been reading up on numerical integration, and I have a fair handle on that part. And I am able to follow how you solved the differential equation. But there is one thing that I am still confused about, and this is maybe more a general misunderstanding on my part for differential equation solutions.

It has to do with the lower limit "a" of the integration. How is this chosen appropriately for a practical situation?

The lower limit corresponds to the arbitrary constant of integration.

To obtain a unique solution for f, you need to specify the value of f at some x_0. You then have f(x) = \frac{1}{x - 20}\left((x_0 - 20)f(x_0) + \int_{x_0}^x g(t)\,dt\right)

EDIT: If you take x_0 = 20 then you must take f(20) = g(20) to avoid a singularity.
 
Okay, that was what I was thinking since I do have f(20)=g(20) in all cases. Now if I use, for example, Newton-Cotes to approximate the integral for the different points, it seems that I will have a bad approximation for x=50, with increasingly better ones up to x=500. This seems a little arbitrary to me in some sense (shouldn't it be reversible?). Also, why would it get more accurate the further I get away from my "starting point", even if I have more intermediate values at that point? Or could I oscillate somehow? For example, use all the values to get an approximation for 500, but then taken 500 as my starting point and change the sign in front of the integral to a minus to a good value for 50? Or does that not make work?

Thinking a bit more on this, shouldn't having many points increase the accuracy equally for all the points I have?
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
682
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K