Exact solution and Euler method approximation for a first order differential equation

793 Views Asked by At

Having trouble wrapping my brain around this question.. don't know where to start.

A. Consider the differential equation $f'(x) = (x + 1)f(x)$ with $f(0) =1$. What is the exact formula for $f(x)$?

I tried solving for $f(x)$ but that just gives me $(x+1)f'(x)$. I feel like that's not sufficient here.

B. Solve for $f(.2)$ using Eulers approximation method with increment $h = .01$ for $x\in[0,0.2]$.

Edit- my work for part A.

integral f'(x) = integral(x+1) *f(x)+(x+1) * integral (f(x)

so f(x) = ((x^2+x)/2)*f(x) + (x+1) * (f(x)^2)/2.

I don't believe this is the right answer.

2

There are 2 best solutions below

0
On

$$f'(x) = (x + 1)f(x)$$ Is a separable differential equation of first order.

Rewrite as: $$ \frac {df}{dx}=(x+1)f$$ $$ \frac {df}{f}=(x+1)dx$$ Integrate both sides and apply initial condition.

0
On

Your question is similar to this one: How to solve this first order linear ODE $ Y'(y)- \frac{n^2}{y}Y(y)=0$?

This is just an additional information, since all the other answers are correct. The following is my answer to the question linked.

"You can also use the formula for solve the following ODE:

Notice that I changed the letters!!

$$y'+P(x)y=Q(x) \,\,\,\, (1)$$

which is:

$$y = \frac{\int v(x)\cdot Q(x) dx+ C}{v(x)}\,\,\,\, (2)$$

where $v(x) = e^{\int P(x)dx}\,\,\,\, (3)$

This formula (2) is obtained when you multiply (1) by $v(x)$ and set the relation in (3)."