15.6.17 problem 17
Internal
problem
ID
[2974]
Book
:
Differential
Equations
by
Alfred
L.
Nelson,
Karl
W.
Folley,
Max
Coral.
3rd
ed.
DC
heath.
Boston.
1964
Section
:
Exercise
10,
page
41
Problem
number
:
17
Date
solved
:
Sunday, March 30, 2025 at 01:02:51 AM
CAS
classification
:
[_linear]
\begin{align*} \sin \left (\theta \right ) r^{\prime }+1+r \tan \left (\theta \right )&=\cos \left (\theta \right ) \end{align*}
✓ Maple. Time used: 0.002 (sec). Leaf size: 24
ode:=sin(theta)*diff(r(theta),theta)+1+r(theta)*tan(theta) = cos(theta);
dsolve(ode,r(theta), singsol=all);
\[
r = \frac {2 \ln \left (\tan \left (\frac {\theta }{2}\right )-1\right )+\theta +c_1}{\sec \left (\theta \right )+\tan \left (\theta \right )}
\]
✓ Mathematica. Time used: 7.795 (sec). Leaf size: 164
ode=Sin[\[Theta]]*D[ r[\[Theta]], \[Theta] ]+1+r[\[Theta]]*Tan[\[Theta]]==Cos[\[Theta]];
ic={};
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
\[
r(\theta )\to \frac {1}{4} e^{-\coth ^{-1}(\sin (\theta ))} \left (\frac {\sqrt {2} \sqrt {-\cot ^2(\theta )} \left (\frac {4 \sqrt {-\sin ^2(\theta )} \left (\sqrt {\sin ^2(\theta )}-1\right ) \cos (\theta ) \csc (2 \theta ) \left (\sqrt {2} \sqrt {\sin ^2(\theta )} \text {arctanh}\left (\sqrt {-\tan ^2(\theta )}\right )-\sqrt {\cos (2 \theta )-1} \text {arctanh}\left (\sqrt {\cos ^2(\theta )}\right )\right )}{\sin (\theta )-1}-2 \sqrt {\cos (2 \theta )+1} \tan (\theta ) \left (2 \log \left (1-\tan \left (\frac {\theta }{2}\right )\right )-\log \left (\tan \left (\frac {\theta }{2}\right )\right )\right )\right )}{\sqrt {\cos ^2(\theta )}}+4 c_1\right )
\]
✓ Sympy. Time used: 30.765 (sec). Leaf size: 124
from sympy import *
theta = symbols("theta")
r = Function("r")
ode = Eq(r(theta)*tan(theta) + sin(theta)*Derivative(r(theta), theta) - cos(theta) + 1,0)
ics = {}
dsolve(ode,func=r(theta),ics=ics)
\[
r{\left (\theta \right )} = \frac {\sqrt {\sin {\left (\theta \right )} - 1} \left (C_{1} + \int \frac {\sqrt {\sin {\left (\theta \right )} + 1}}{\sqrt {\sin {\left (\theta \right )} - 1} \sin {\left (\theta \right )}}\, d\theta - \int \frac {\sqrt {\sin {\left (\theta \right )} + 1}}{\sqrt {\sin {\left (\theta \right )} - 1} \tan {\left (\theta \right )}}\, d\theta + \int \frac {\sqrt {\sin {\left (\theta \right )} + 1} r{\left (\theta \right )} \tan {\left (\theta \right )}}{\sqrt {\sin {\left (\theta \right )} - 1} \sin {\left (\theta \right )}}\, d\theta \right )}{\sqrt {\sin {\left (\theta \right )} - 1} \int \frac {\sqrt {\sin {\left (\theta \right )} + 1}}{\sqrt {\sin {\left (\theta \right )} - 1} \cos {\left (\theta \right )}}\, d\theta - \sqrt {\sin {\left (\theta \right )} + 1}}
\]