# Homework Help: Differential equation help

1. Sep 5, 2007

### robierob12

Solve the Differential Equation

(1-cos(x))dy + (2ysin(x) - tan(x)) dx = 0

I have tried this two ways so far and either way that I do it does not look correst.

First way: As a seperable DE.

(1-cos(x))dy/dx = 2ysin(x) - tan(x)

simplifying I eventually get......

dx - sec(x)dx = [cscx(cosx + 1)/2y]dy

and more simplifing

[1- sec(x)]dx/cscx(cosx + 1) = dy/2y

Then I integrated the right side and am having trouble integrating the left side.

int.[tan(x) * (cosx - 1)/(cosx + 1)] = (1/2) ln (y ) +c

is this a reasonable place to keep going from? if so, any tips on the integration?

The second way I did this is as a first order linear DE.

I got it in the form

(dy/dx) + p(x)y = q(x)

I used e and raised it to the integral of p(x)

and did some more work

y[e^[-2ln(1 - cosx)] = integrate.[ -tanx( 1 / (1-cosx))(e^[-2ln(1 - cosx))]

the right side does not look like other problems I do at the end when I do the final integration.

any thoughts on this...? Even make any sense?

2. Sep 5, 2007

### Dick

The equation isn't separable - so your first approach is just an error. Use the second approach with the integrating factor. But you have a sign error in your integral of p. And note that exp(2ln(1-cosx)) can be written a lot more simply.