Originally Posted by

**ben.mahoney@tesco.net** I am stuck on this question. I have shown my workings after the questions. If you can see where i have gone wrong could you please let me know. Cheers.

Q. Consider a function f(x) for x between 0 and1 which satisfies the ordinary diferential equation:

f '(x) + f(x)^2 = 0 with the initial condition f(0) = 1 (1)

a) Repetitively use equation (1) to calculate higher derivatives of f for x = 0. In particular, calculate: f '(0) f ''(0) f '''(0) f ''''(0):

b) The polynomial P(x) is the fourth order Taylor approximation to the function f(x), i.e. f(x) = P(x) + O(x5):

Use your result from subsection a and write down P(x).

c) Show that the exact solution of (1) is given by

f(x) = 1=(1 + x)

My answers:

a) Rewrite f '(x) + f(x)^2 = 0 as f '(x) = -f(x)^2

so f '(0) = -f(0)^2 = -1^2 = 1

f '’(x) = f ‘(-f(x)^2) = -2f(x)

so f ‘’(0) = -2f(0) = -2(1) = -2

f '’’(x) = f ‘(-2f(x)) = -2

so f ‘’’(0) = -2

f '’’’(x) = f ‘(-2) = 0

so f’’’’(0) = 0

b) Taylor approximation f(x) = f(0) + f ' (0)x +x^2/2! f ''(0) + x^3/3! f '''(0) + x^4/4! f ''''f(0) + O(x^5)

With my answers from part a i get:

P(x) = 1 -2x - 2x^2 - 2x^3

c) f ' (1/1+x) + (1/1+x)^2 = 0

-1/(1+x)^2 + 1/(1+x)^2 = 0

f(0) = 1/1+0 = 1 so satisfies the initial conditions

the P(x) cannot be correct becuase plotting a graph of p(x) and the exact solution doesnt give the same graph.