How can I solve a first-order non-linear ODE?

*FaerieLight*
Messages
43
Reaction score
0
Hi! I'm having a lot of trouble solving the following ODE:

dx/dt = A - B*sin(x)

where A and B are constants. My ODE skills are a bit rusty, and I wasn't able to find anything on the Internet that could help me, so could someone please show me how to solve for x in terms of t?

I've tried rearranging the equation to get:

x = At - B ∫\frac{sin(x)}{A-B*sin(x)} dx

and I tried solving that and I got a very complicated expression involving inverse tan, which I am not sure is correct. I don't want to do it this way by direct integration if there is a much easier way to solve the ODE. But if there isn't, then .

Thanks a lot!
 
Physics news on Phys.org
That's an odd rearrangement - how did you get that?
Did you try using direct separation of variables?
 
You have rearranged it wrong I think. If you have dx/dt = A - B*sin(x), wouldn't you have have dt = dx/(A - B*sin(x))?

Then integrating both sides: t = -(2/C)*arctan(D) + constant.

C = (A^2 - B^2)^(1/2)
D = (B -A*tan(x/2))/C

Wolfram alpha gave me the value of that integral. I am not sure how the A coefficient gets to the tan function, but to find out, one could try using the Weierstrass substitution: sin(x) = 2u/(1 + u^2) and dx = du/1 + u^2, after that you would have to use partial fractions to evaluate the integral of the reciprocal of the quadratic.
 
Last edited:
Hi! Thanks for your help! What I meant by rearranging is that I just put dx/dt on the LHS and A-B*sin(x) on the RHS, and then integrated both sides with respect to t, so that I got an integral of sin(x) with respect to t. I then rewrote dt as dt/dx * dx, and got an expression in terms of sin(x) for dt/dx from the original ODE, which led to the sin(x) on A-B*sin(x) integral over x.

Doing it using the separation of variables actually makes other calculations I have to do (get an expression for sin(x)) much more manageable than what I was doing before. So thanks! :smile:
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top