The Student Room Group

Differential Equation

How do you solve

y+ycotx=exy'+y \cot{x}=e^{-x}

it's been years since i did this stuff.

is it the old complementary function and particular integral?

if so, i get

dydx=cotx\frac{dy}{dx}=-\cot{x}
dyy=cotxdx\frac{dy}{y}=-\cot{x} dx
lny=lnsinx+C\ln{y}=-\ln{\sin{x}}+C
y=Belnsinxy=Be^{-\ln{\sin{x}}}
y=Csinxy=\frac{C}{\sin{x}}

and then for the particular integral if we take y=kexy=ke^{-x}

the equation implies

kex+kcotxex=exke^{-x} + k \cot{x} e^{-x} = e^{-x}
k+kcotx=1k+k \cot{x} = 1
k(1+cotx)=1k (1 + \cot{x} ) = 1
k=1(1+cotx)k = \frac{1}{(1 + \cot{x})}


and so the general solution is

y=Csinx+1(1+cotx)exy= \frac{C}{\sin{x}} + \frac{1}{(1 + \cot{x})} e^{-x}

Can anyone agree/disagree?
(edited 13 years ago)
Original post by latentcorpse
Can anyone agree/disagree?


I think, best to swiftly draw a line under that lot.

y+cotx=exy'+\cot{x}=e^{-x}

So

y=excotxy'=e^{-x}-\cot{x}


y=excotx  dxy=\int e^{-x}-\cot{x}\;dx
Reply 2
Original post by ghostwalker
I think, best to swiftly draw a line under that lot.

y+cotx=exy'+\cot{x}=e^{-x}

So

y=excotxy'=e^{-x}-\cot{x}


y=excotx  dxy=\int e^{-x}-\cot{x}\;dx


oops its meant to be cotxy \cot{x} y
(edited 13 years ago)
Original post by latentcorpse
oops its meant to be cotxy \cot{x} y


In that case, dunno; too rusty, myself!
Original post by latentcorpse
How do you solve

y+ycotx=exy'+y \cot{x}=e^{-x}

it's been years since i did this stuff.

is it the old complementary function and particular integral?

if so, i get

dydx=cotx\frac{dy}{dx}=-\cot{x}
dyy=cotxdx\frac{dy}{y}=-\cot{x} dx
lny=lnsinx+C\ln{y}=-\ln{\sin{x}}+C
y=Belnsinxy=Be^{-\ln{\sin{x}}}
y=Csinxy=\frac{C}{\sin{x}}

and then for the particular integral if we take y=kexy=ke^{-x}

the equation implies

kex+kcotxex=exke^{-x} + k \cot{x} e^{-x} = e^{-x}
k+kcotx=1k+k \cot{x} = 1
k(1+cotx)=1k (1 + \cot{x} ) = 1
k=1(1+cotx)k = \frac{1}{(1 + \cot{x})}


and so the general solution is

y=Csinx+1(1+cotx)exy= \frac{C}{\sin{x}} + \frac{1}{(1 + \cot{x})} e^{-x}

Can anyone agree/disagree?

Use the integrating factor method. i.e. for a DE of the form:

dydx+p(x)y=q(x)\frac{dy}{dx} + p(x)y = q(x)

The integrating factor is ep(x)dxe^{\int p(x) dx}

Multiply through the DE by the integrating factor and spot the derivative on the LHS. The differential equation will now be separable.
Reply 5
Original post by latentcorpse
How do you solve

y+ycotx=exy'+y \cot{x}=e^{-x}

it's been years since i did this stuff.

is it the old complementary function and particular integral?

if so, i get

dydx=cotx\frac{dy}{dx}=-\cot{x}
dyy=cotxdx\frac{dy}{y}=-\cot{x} dx
lny=lnsinx+C\ln{y}=-\ln{\sin{x}}+C
y=Belnsinxy=Be^{-\ln{\sin{x}}}
y=Csinxy=\frac{C}{\sin{x}}

and then for the particular integral if we take y=kexy=ke^{-x}

the equation implies

kex+kcotxex=exke^{-x} + k \cot{x} e^{-x} = e^{-x}
k+kcotx=1k+k \cot{x} = 1
k(1+cotx)=1k (1 + \cot{x} ) = 1
k=1(1+cotx)k = \frac{1}{(1 + \cot{x})}


and so the general solution is

y=Csinx+1(1+cotx)exy= \frac{C}{\sin{x}} + \frac{1}{(1 + \cot{x})} e^{-x}

Can anyone agree/disagree?


I disagree
You are right at solving the homogeneous part and
Y=CsinxY=\frac{C}{sinx}
THen for the particular I would take
y=k(x)sinxy=\frac{k(x)}{sinx}
That is consider C as function of x C=k(x)
At substituting it into original equation derivate is as a fraction.

Apart from this in your work you took y=ke^(-x)
but then y=dkdxexkexy'=\frac{dk}{dx}e^{-x}-ke^{-x}
and substituting into the original you get more complicated DE.

Quick Reply

Latest