1. Aug 21, 2005

### memarf1

Im trying to turn this equation into 2 seperate equations in order to place it in a runge kutta problem. This is the proposed problem and conditions:

$$\frac{d^2f}{dx^2} + f = 0$$

allowing

$$f (x) = A\cos x + B\sin x$$
$$f ' (x) = -A\sin x + B\cos x$$
$$f '' (x) = -A\cos x - B\sin x$$

and
$$g = \frac{df}{dx}$$

meaning
$$\frac{df}{dx} - g = 0$$ which is identical to $$\frac{d^2f}{dx^2} + f = 0$$

so
$$\frac{dg}{dx} + f = 0$$

the initial conditions for equation 1 are:
$$f (0) = 1$$
$$f ' (0) = 0$$

and for equation 2 are:
$$f (0) = 0$$
$$g (0) = 1$$

I hope this formatting is more easy to read.
any suggestions??

Last edited: Aug 21, 2005
2. Aug 21, 2005

### Zurtex

Right, you really need to learn Latex. So your post I tjink would go like this:

$$\frac{d''f}{dx''} + f = 0$$

Therefore:

$$f (x) = A\cos x + B\sin x$$
$$f ' (x) = -A\sin x + B\cos x$$
$$f '' (x) = -A\cos x - B\sin x$$

However, before I try to translate the rest, I feel it worth noting that this is very confusing:

$$\frac{d''f}{dx''}$$

Please stick to something like this:

$$\frac{d^{2}y}{dx^{2}} \quad \text{or} \quad y''$$

3. Aug 21, 2005

### memarf1

yes, that is correct.

Off Subject, but what is latex?

4. Aug 21, 2005

### Zurtex

Click on any of my equtions and a box should appear showing the cde I used to write it.

It's very early in the morning here, I'll come back and look at your problem later sorry, too tired right now.

5. Aug 21, 2005

### memarf1

Ok, well, I have changed the formatting, thank you for your continued help, ill check back in in the morning. Thanks again.

Im just looking for the 2 equations to plug into the runge kutta 4. I hope you can help. I have another post with my C++ code in it, but the code is correct. I just have to do this to show my professor.