---
title: "Solve sin x dy/dx + y cos x = x sin x"
subject: "Mathematics I"
chapter: 4
key: "semester_1/mathematics_i:de-sinx-dy-dx-y-cosx"
source: https://www.bctengineer.com/q/semester_1/mathematics_i/de-sinx-dy-dx-y-cosx
site: BCT Engineering
---

# Solve sin x dy/dx + y cos x = x sin x

Mathematics I · Chapter 4: Ordinary Differential Equations and their Applications

- Asked in: 2071 Shrawan, 5 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_1/mathematics_i/de-sinx-dy-dx-y-cosx
- Whole chapter: https://www.bctengineer.com/md/semester_1/mathematics_i/chapter-4

## Question

Solve: sin x dy/dx + y cos x = x sin x.

## Short answer

The left side is the exact derivative d(y sin x)/dx = x sin x. Integrating by parts gives y sin x = sin x - x cos x + c.

## Answer

sin x dy/dx + y cos x = x sin x

#### Recognise an exact derivative
The left side is d(y sin x)/dx. So

d(y sin x)/dx = x sin x

#### Integrate
y sin x = ∫ x sin x dx = −x cos x + ∫ cos x dx = −x cos x + sin x + c

**y sin x = sin x − x cos x + c**

or y = 1 − x cot x + c cosec x.

(Alternative check by the standard method: dividing by sin x gives y' + y cot x = x with IF = sin x, which leads to the same result.)

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why is the left side easy to integrate?
   A. It is a Bernoulli form
   B. It is d(y sin x)/dx
   C. It is d(y cos x)/dx
   D. It is d(y/sin x)/dx
   Answer: B. Product rule gives sin x y' + y cos x. (Key point: Recognition)

2. Integral of x sin x dx equals:
   A. x cos x - sin x + c
   B. -x cos x - sin x + c
   C. x sin x + cos x + c
   D. -x cos x + sin x + c
   Answer: D. By parts with u = x, dv = sin x dx. (Key point: Integration by parts)

3. The solution is:
   A. y sin x = x cos x - sin x + c
   B. y sin x = sin x - x cos x + c
   C. y cos x = sin x - x cos x + c
   D. y = sin x - x cos x + c
   Answer: B. Result of the previous integration. (Key point: Final solution)

4. In standard form y' + y cot x = x, the IF is:
   A. tan x
   B. cos x
   C. sin x
   D. cosec x
   Answer: C. e^(integral cot x dx) = sin x. (Key point: Standard method check)

## Related in Mathematics I

- [Solve (1+y²)+(x−e^(tan⁻¹y))dy/dx=0](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-1-plus-y2-x-minus-e-atan-y) — Mathematics I, chapter 4, asked 6×
- [Solve dy/dx = y/x + tan(y/x)](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-dy-dx-y-over-x-tan) — Mathematics I, chapter 4, asked 6×
- [Solve dy/dx − 2y tan x = y² tan x](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-bernoulli-2y-tan-x) — Mathematics I, chapter 4, asked 6×
- [Solve (1+x²)dy/dx+y=e^(tan⁻¹x)](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-1-plus-x2-dy-dx-etan) — Mathematics I, chapter 4, asked 6×
- [Solve x dy/dx + y log y = xy eˣ](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-x-dy-dx-y-log-y) — Mathematics I, chapter 4, asked 4×
- [Solve x log x dy/dx + y = 2 log x](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-x-log-x-dy-dx) — Mathematics I, chapter 4, asked 4×

## Related in other subjects

- [RK-4: dy/dx = (1+x²)y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark4-y-1-x2) — Numerical Method, chapter 6
- [Polar coordinates: ∫∫(x²+y²) dy dx](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Apolar-coordinates-x2-y2-dy) — Mathematics, chapter 2, asked 5×
- [Evaluate ∫∫ e^(y/x) dy dx](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Aevaluate-e-y-x-dy) — Mathematics, chapter 2
- [Evaluate ∫∫ e^(x²) dx dy](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Aevaluate-e-x2-dx-dy) — Mathematics, chapter 2
