# Differential Equation help.

Say I've got an equation with a couple of variables like:

$$\frac{dy(x)}{dx}\ - \frac{r(x)y(x)}{g(x)}\ = p(x)$$

If I'm trying to find the value of y(x) at a specific value of x, can I sub that value of x into the differential equation before I solve it? I would normally use the integrating factor method, but I have functions where r(x)/g(x) isn't able to be integrated, but I know their values at point I'm looking to find the value of.

-
No there is not much to do before you solve it. Here you can use integrating factor method. If you have BOTH $x$ and $y$ then you can get slope $y'$. That is the basis of Euler method for numerical solution. – Maesumi Mar 3 '13 at 20:34
Because I couldn't integrate the functions, I evaluated them, and then integrated when doing the integrating factor method - is that wrong? In the question I'm attempting, it sounds like it asks for an exact solution rather than an approximation. – Sanya Mar 3 '13 at 20:45
Since this equation is linear, you can use integrating factors. Notice that integrating factors works up to our abilities to solve integrals; i.e if the function $\frac{r(x)}{g(x)}$ has an elementary antiderivative. However, plugging in $x_0$ before solving the equation won't do you any good, since you don't know what $y(x)$ is. – noobProgrammer Mar 3 '13 at 20:59
What if you knew an initial condition? Would that help - i.e. I know y(0). – Sanya Mar 3 '13 at 21:13
@Sanya using $(x_0,y_0)$ will give you $y'(x_0)$. But that's it, just the information at the starting point. – Maesumi Mar 3 '13 at 22:43

As long as you know what $$\left(\frac{dy}{dx} - p(x)\right)\frac{g(x)}{r(x)}$$ is for your particular $x$, then yes, you certainly can simply plug in $x$.