Solving a differential equation (using an integrating factor) Given this differential equation: $$tx'-x-kt^2 \sin (\omega t) = 0 , t>0$$
I have to solve the differential equation using this formula: 
$$y'(x) + a(x) \cdot y(x) = B(x)$$
I have no idea where to start. This differential equation is confusing me. Can somebody help me answering the following questions?
1.) Is $k$ a constant?
2.) What is $y'(x)$? (is it $tx'$) 
3.) Is $B(x) = 0$? (since it is a homogeneous equation)
4.) What is $a(x)\cdot y(x)$? Is it $-x$? 
 A: First step: Identifying the main variables
Your formula relates $y$ as a function of $x$. The problem has $x$ as a function of $t$. What to do? switch out variables
$$ x'(t) + a(t)\cdot x(t) = b(t) \tag{1} $$
Here's the original equation, written more explicitly
$$ t \cdot x'(t) - x(t) - kt^2\sin(\omega t) = 0 \tag{2} $$
If no other information is given, it is safe to assume that all other variables ($k$, $\omega$) are constant

Second step: Compare coefficients
It's important to identify which role each variable takes. In this case the function $a(t)$ is simply the coefficient of $x(t)$ and the function $b(t)$ is the constant coefficient (constant in $x$, not $t$).
Notice that the given problem in $(2)$ is not quite in the same form as the formula in $(1)$. The $x'(t)$ term has no coefficient in front of it. To force equation to have $x'(t)$ by itself, we divide through by whatever is in front of it, which in this case is $t$
$$ x'(t) - \frac{1}{t}\cdot x(t) - kt \sin(\omega t) = 0 \tag{3} $$
But hold on, there's another term after $x(t)$ while in $(2)$ there are none, so we need to move this to the other side of the equality
$$ x'(t) - \frac{1}{t}\cdot x(t) = kt \sin(\omega t) \tag{4} $$
Now finally our equation is in the same form, and we can identify the coefficients. Results are
$$ \begin{aligned} 
a(t) &= -\frac{1}{t} \\ 
b(t) &= kt\sin(\omega t) 
\end{aligned} \tag{5} $$

Last step: Classifying the equation (and solving)
This isn't part of your question, but it also seems to confuse you. To get it out of the way, the equation is not homogeneous since $b(t) \ne 0$. It also has non-constant coefficients as both $a(t)$ and $b(t)$ depend on $t$.
I hope this helps. Good luck in your studies, consult your textbook and get help from your instructor(s) when you can.
A: *

*It is impossible to know for sure what the questioner intended if it is not explicitly stated, but it is probably safe to assume that $k$ is a constant.

*In the formula you quote, you are trying to solve for $y$ as a function of $x$, and $y'(x)$ is the derivative of the (supposed) solution $y(x)$. In your case you are trying to solve for $x$ as a function of $t$... 

*The equation is not homogeneous. How to show this depends on what definition you have been given, but roughly speaking the term $kt^{2}\sin(wt)$ should indicate that it is not.

*In order to find what to substitute for $a(x)$ (I assume this is what you mean), it is necessary to first put your equation into the same form as the equation you are supposing to match it to. In particular, in the formula you quote, $y'(x)$ is not multiplied by anything. In your equation, $x'(t)$ is multiplied by something. Maybe you can rearrange it to fix that?

