# Differential equation $\sin \theta \frac{dr}{d \theta}+r\cos \theta =\tan \theta,0<\theta<\pi/2$ [closed]

This problem has been stumping me for over an hour how can I set it up, I think I have done it wrong over and over. Solving for $r$.

## closed as off-topic by William, Tunk-Fey, Claude Leibovici, Ivo Terek, Davide GiraudoAug 15 '14 at 10:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – William, Tunk-Fey, Claude Leibovici, Ivo Terek, Davide Giraudo
If this question can be reworded to fit the rules in the help center, please edit the question.

• show us what you have tried plz? Its part of the rules of posting here, even if the work is wrong you might be super close and an answer could be something as simple as "double check line 12" and boom you got it right. Showing work also makes us as the conditional-humans we are feel good since its like an even trade, detailed question for detailed answer – frogeyedpeas Aug 15 '14 at 7:30
• $\LaTeX$ified, your equation should read $(dr/d\theta)\sin \theta + r\cos \theta = \tan \theta$, right? Got any initial/boundary conditions? – Robert Lewis Aug 15 '14 at 7:33
• I added the differential equations tag. Hope you don´t mind. If so, feel free to change it back! Regards. – Robert Lewis Aug 15 '14 at 8:47

Hint: $$\frac{d}{d\theta}(r\sin\theta)=\frac{dr}{d\theta}\sin\theta+r\cos\theta$$

• This is not an answer. Perhaps you could have posted it as a comment. – agtortorella Aug 15 '14 at 8:02
• This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – kjetil b halvorsen Aug 15 '14 at 8:15
• @kjetil: Who is critiquing or requesting clarification? – Jonas Meyer Aug 15 '14 at 8:40
• I didn't understand the flags on this fine hint at all. – Jyrki Lahtonen Aug 15 '14 at 10:01
• @Giuseppe Tortorella: hint answers have long been accepted on this site. They are often used when the answerer suspects the asker will be able to solve the problem themselves with a little help. Some answerers use hints to avoid completely solving problems that might be homework, or problems like this where the OP has not included any context or effort in the question. – Carl Mummert Aug 16 '14 at 12:17

Note that

$\dfrac{d(r \sin \theta)}{d\theta} = \dfrac{dr}{d \theta} \sin \theta + r \cos \theta, \tag{1}$

$\dfrac{d(r\sin \theta)}{d\theta} = \tan \theta = \dfrac{\sin \theta}{\cos \theta} = \dfrac{-d\ln(\cos \theta)}{d \theta}, \tag{2}$

valid for $0 < \theta < \pi/2$. (2) in turn may be written

$\dfrac{d(r \sin \theta + \ln(\cos \theta))}{d\theta} = 0. \tag{3}$

(3) yields

$r\sin \theta + \ln(\cos \theta) = c, \tag{4}$

for some constant $c$. (4) in turn gives $r$ as a function of $\theta$:

$r = \dfrac{c - \ln(\cos \theta)}{\sin \theta}, \tag{5}$

and if we know $r_0$ at $\theta_0$, $c$ may be found from (4)

$c = r_0 \sin \theta_0 + \ln(\cos \theta_0). \tag{6}$

Hope this helps. Cheers,

and as always,

Fiat Lux!!!

First you have to note that the integral factor of the differential equations of the form $\dfrac{dy}{dx}+p(x)y=q(x)$ ,where $p(x)$ and $q(x)$ are only the functions of $x$ is given by $I_x=e^{\int p(x)dx}$ After multiplying both sides by this factor you will get a equation of the form $\dfrac{d(I_xy)}{dx}=I_xq(x)$ ,which can solve by separating variables. $$\ sin \theta \dfrac{dr}{d \theta}+r\cos \theta =\tan \theta,0<\theta<\pi/2$$ $$\dfrac{dr}{d \theta}+r\cot \theta =\dfrac{\tan \theta}{\sin \theta}$$ The Integral factor is $I_\theta=e^{\int \cot \theta d \theta}=e^{\ln( \sin\theta)}=\sin \theta$ $$\dfrac{d(r \sin \theta)}{d \theta}=\tan \theta=\dfrac{d(\ln \sec \theta)}{d \theta}$$ Then the solution become trivial.