Idea behind the definition of direct image of $\mathscr{D}$-modules Let $f:X\to Y$ be a morphism of smooth algebraic varieties over $\mathbb{C}$.
Since $\mathcal{D}_{X\to Y}$ is a $(\mathcal{D}_X,f^{-1}\mathcal{D}_Y)$-bimodule, given a right $\mathcal{D}_X$-module $M$, we have a natural right $\mathcal{D}_Y$-module defined as
$$f_*(M\otimes_{\mathcal{D}_X} \mathcal{D}_{X\to Y}).$$
If I understood correctly, the idea now is to use the equivalence of categories between left and right $\mathcal{D}$-modules to obtain a direct image of left $\mathcal{D}$-modules. This should work in the following way:

*

*We begin with a left $\mathcal{D}_X$-module $M$;

*Then we obtain a right $\mathcal{D}_X$-module $M\otimes_{\mathcal{O}_X}\omega_X$;

*Then we do the preceding operation, resulting in the right $\mathcal{D}_Y$-module $f_*(M\otimes_{\mathcal{O}_X}\omega_X \otimes_{\mathcal{D}_X}\mathcal{D}_{X\to Y})$;

*Finally, we obtain the left $\mathcal{D}_Y$-module $\omega_Y^\vee\otimes_{\mathcal{O}_Y} f_*(M\otimes_{\mathcal{O}_X}\omega_X \otimes_{\mathcal{D}_X}\mathcal{D}_{X\to Y})$.

This doesn't seems to agree with the usual definition $f_*(\mathcal{D}_{Y\leftarrow X}\otimes_{\mathcal{D}_X}M)$. What is going on here?
 A: This looks like an application of the projection formula to me. Let me try.
$$
\omega_Y^\vee\otimes_{\mathcal{O}_Y} f_*((M\otimes_{\mathcal{O}_X}\omega_X) \otimes_{\mathcal{D}_X}\mathcal{D}_{X\to Y})
\cong \omega_Y^\vee\otimes_{\mathcal{O}_Y} f_*((\mathcal{D}_{X\to Y}\otimes_{\mathcal{O}_X}\omega_X) \otimes_{\mathcal{D}_X}M)
\cong
f_{*}(f^{*}\omega_Y^\vee\otimes_{\mathcal{O}_X}(\mathcal{D}_{X\to Y}\otimes_{\mathcal{O}_X}\omega_X \otimes_{\mathcal{D}_X}M))
\cong
f_{*}((f^{*}\omega_Y^\vee\otimes_{\mathcal{O}_X}\mathcal{D}_{X\to Y}\otimes_{\mathcal{O}_X}\omega_X) \otimes_{\mathcal{D}_X}M)
\\
\cong f_{*}((f^{-1}\omega_Y^\vee\otimes_{f^{-1}\mathcal{O}_{Y}}\mathcal{O}_{X}\otimes_{\mathcal{O}_X}\mathcal{D}_{X\to Y}\otimes_{\mathcal{O}_X}\omega_X) \otimes_{\mathcal{D}_X}M)
\cong f_{*}((f^{-1}\omega_Y^\vee\otimes_{f^{-1}\mathcal{O}_{Y}}\mathcal{D}_{X\to Y}\otimes_{\mathcal{O}_X}\omega_X) \otimes_{\mathcal{D}_X}M)
$$
Depending on what definition of $D_{Y\leftarrow X}$ you work with this could answer your question.
In my point of view $D_{Y\leftarrow X}=f^{-1}\omega_{Y}^{\vee}\otimes_{f^{-1}\mathcal{O}_{Y}}\mathcal{D}_{X\rightarrow Y}\otimes_{\mathcal{O}_{X}}\omega_{X}$ and the left $D_{Y}$ module structure of the direct image of $M$ comes from the right $f^{-1}D_{Y}$-module structure of $\mathcal{D}_{X\rightarrow Y}$ which turns $D_{Y\leftarrow X}$ into a left $f^{-1}\mathcal{D}_{Y}$-module by tensoring with $f^{-1}\omega_{Y}^{\vee}$ and therefore $f_{*}(\mathcal{D}_{Y\leftarrow X}\otimes_{D_{X}}M)$ into a left $\mathcal{D}_{Y}$-module.
