0

enter image description here

how we write this equation in latex in given form

  • 10
    Nice try, but even the most comprehensive answer won't help you much. You won't get written all of your equations here. Learn LaTeX. Read an introduction and the command texdoc packagenameis a great help. – Keks Dose Feb 14 '19 at 11:58
  • 2
    Welcome to Stack Exchange! It looks like there's already a few solutions posted below. Great. However may I suggest that next time you ask a question, mention what you have already tried.

    e.g. Have you figured out how to write a gamma on its own? Have you figured out how to write a fraction? How to write du/dz? etc. The more effort you demonstrate you have put in, the more effort others will be willing to put in for you. It also helps us understand precisely which part of the task you need help with.

    – falsePockets Feb 15 '19 at 04:49
  • 1
    I have downvoted, because this question does not show any research effort. – gerrit Feb 15 '19 at 08:08
  • Here is the solution given by the powerful Mathpix Snipping Tool $u \frac{\partial u}{\partial x}+v \frac{\partial u}{\partial y}+w \frac{\partial u}{\partial z}+\lambda_{1}\left(\begin{array}{c}u^{2} \frac{\partial^{2} u}{\partial x^{2}}+v^{2} \frac{\partial^{2} u}{\partial y^{2}}+w^{2} \frac{\partial^{2} u}{\partial z^{2}} \\ +2 u v \frac{\partial^{2} u}{\partial x \partial y}+2 v w \frac{\partial^{2} u}{\partial y \partial z}+2 u w \frac{\partial^{2} u}{\partial x \partial \tilde{z}}\end{array}\right)=\nu \frac{\partial^{2} u}{\partial z^{2}}$. – projetmbc Apr 27 '21 at 18:27

7 Answers7

28

With a few shortcut macros it's much easier:

plain TeX version:

\let~\catcode~`86~`j0~`X13~`C1~`D2~`M3jdefX81C~`8113jdefDXZZ81C~
`8113DXYY81CZ81jletDYLLjletYFFjfiYNNjdefYPPjpartialZIZAZBZj{Zj}Y
EEjexpandafterYOOjelseYKKjifxNI818283CL}81NAC82DNBC83Djfuturelet
jTjHDNjHCKjT}L{AOL{BF{DXUUCI)jpCjp)CDDDY VVjoverNjp)818283CKX81X
CP82VP83DOCP^C81D82VjbC81DC83DDFDYRRjrelaxNjb8182Cjd8182RDNjd81%
8283CK83RP82^C81DOP82P83FDY!!uY@@vY##wY$$xYj%%yY&&zXvv81C81^2DMM
!U!$+@U!%+#U!&+jlambda_1jleft(v!U)2! $+v@U)2!%+v#U)2!&jatop+2!@U
)2!C$%D+2@#U)2!C%&D+2!#U)2!C$&Djright)=jnuU)2!&jeqno(1.25)MMjbye

LaTeX version:

\documentclass{article}\begin{document}
\let~\catcode~`86~`j0~`X13~`C1~`D2~`M3jdefX81C~`8113jdefDXZZ81C~
`8113DXYY81CZ81jletDYLLjletYFFjfiYNNjdefYPPjpartialZIZAZBZj{Zj}Y
EEjexpandafterYOOjelseYKKjifxNI818283CL}81NAC82DNBC83Djfuturelet
jTjHDNjHCKjT}L{AOL{BF{DXUUCI)jpCjp)CDDDY VVjoverNjp)818283CKX81X
CP82VP83DOCP^C81D82VjbC81DC83DDFDYRRjrelaxNjb8182Cjd8182RDNjd81%
8283CK83RP82^C81DOP82P83FDY!!uY@@vY##wY$$xYj%%yY&&zXvv81C81^2DMM
!U!$+@U!%+#U!&+jlambda_1jleft(v!U)2!$+v@U)2!%+v#U)2!&jatop+2!@U)
2!C$%D+2@#U)2!C%&D+2!#U)2!C$&Djright)=jnuU)2!&jeqno(1.25)MMjstop

output:

enter image description here


Inspired by David Carlisle's xii :)

  • 8
    +1 for snarkiness. – Jacob Manaker Feb 14 '19 at 22:32
  • I don't think MiKTeX gave me a TeX engine. – ahorn May 20 '19 at 21:09
  • @ahorn Sorry, I don't understand what you mean. You didn't find the tex executable? – Phelype Oleinik May 20 '19 at 21:11
  • @PhelypeOleinik I just don't know how to run TeX code, so I thought I'd leave a comment. Sorry for the clutter. – ahorn May 20 '19 at 21:52
  • @ahorn No worries, we can delete them later :-) Do you run LaTeX from the command line or from an IDE? If the latter, then which one? TeXMaker? TeXStudio? Another? – Phelype Oleinik May 20 '19 at 23:59
  • I prefer TeXWorks. Sometimes through MiKTeX on Windows, but my main computer uses the TeXWorks package on Linux. – ahorn May 21 '19 at 10:42
  • @ahorn TeXWorks already has options for pdftex, xetex, and luatex, which all run plain TeX, and the test file above will work on any of them. But if you want Knuth's TeX engine, then here's what you'll do. Open TeXWorks then click the Edit menu Item and Preferences, then on the window that pops up go to the Typesetting tab. In this window there is a list Provessing tools and in the lower right side of this list there is a + button; click on it and a Tool Configuration window should open. Continued... – Phelype Oleinik May 21 '19 at 13:02
  • @ahorn ...continuation: Configure it like this: https://i.stack.imgur.com/zqAYO.png then click OK. Now click the + again and configure the new window like this: https://i.stack.imgur.com/icu2V.png and click OK again and once more. Now in the main windows of TeXWorks, in the list of typesetting tools to the right of the “play” button, you should have a TeX tool and a DVI -> PDF tool. Knuth's TeX produces only DVI output so you can run a file with TeX and then run DVI -> PDF to convert it to PDF. Tell me if it worked :-) – Phelype Oleinik May 21 '19 at 13:02
  • Thanks. This is good enough to be a Q&A. – ahorn May 21 '19 at 13:08
  • @ahorn Indeed, it's always best to ask a question. Feel free to do so ;-) – Phelype Oleinik May 21 '19 at 13:10
6

A variation on the theme, but with a greater emphasis on simplifying the input:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse}

\newcommand{\pdiff}{\mathop{}\!\partial}

\ExplSyntaxOn
\NewDocumentCommand{\pder}{omm}
 {
  \frac{\pdiff\IfValueT{#1}{^{#1}}#2}{\faisal_pder_vars:n { #3 }}
 }
\cs_new_protected:Nn \faisal_pder_vars:n
 {
  \clist_map_inline:nn { #1 } { \pdiff##1 }
 }
\ExplSyntaxOff


\begin{document}

\begin{equation}
u\pder{u}{x}+v\pder{u}{y}+w\pder{u}{z}+
  \lambda_1
  \left(\begin{gathered}
    u^2\pder[2]{u}{x^2}+v\pder[2]{u}{y^2}+w^2\pder[2]{u}{z^2}\\
    \mspace{-\medmuskip}{}
    +2uv\pder[2]{u}{x,y}+2vw\pder[2]{u}{y,z}+2uw\pder[2]{u}{x,z}
    \end{gathered}\right)
= \nu\pder[2]{u}{z^2},
\end{equation}

\begin{equation}
\begin{split}
u\pder{u}{x}&+v\pder{u}{y}+w\pder{u}{z}
+\lambda_1\biggl(
    u^2\pder[2]{u}{x^2}+v\pder[2]{u}{y^2}+w^2\pder[2]{u}{z^2}
\\
&+2uv\pder[2]{u}{x,y}+2vw\pder[2]{u}{y,z}+2uw\pder[2]{u}{x,z}\biggr)
= \nu\pder[2]{u}{z^2},
\end{split}
\end{equation}

\end{document}

The syntax for \pder is

  1. optional argument for the order of the derivative (if greater than 1)
  2. function to differentiate
  3. list of the variables the derivative is taken with respect to, comma separated

In the first case I used \mspace{-\medmuskip}{}+ in order to have the plus sign correctly spaced. I used gathered instead of pmatrix because it is semantically sounder.

enter image description here

egreg
  • 1,121,712
5

Here you go:

\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
    $u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}+\lambda_1\begin{pmatrix}
    u^2\frac{\partial^2 u}{\partial x^2}+v\frac{\partial^2 u}{\partial y^2}+w^2\frac{\partial^2 u}{\partial z^2}\\+2uv\frac{\partial^2 u}{\partial x\partial y}+2vw\frac{\partial^2 u}{\partial y\partial z}+2uw\frac{\partial^2 u}{\partial x\partial z}
    \end{pmatrix} = v\frac{\partial^2 u}{\partial z^2},$
\end{document}

this will give you:

enter image description here

PS: Welcome to TeX.se, from next time, please provide a MWE.

3

Here is a start:

\documentclass[]{article}
\usepackage{amsmath}

\begin{document}
\begin{equation}
    u\frac{\partial u}{\partial x}+...
    +\lambda_1 
    \begin{pmatrix}
    u^2 \frac{\partial^2 u}{\partial x^2}+...\\
    + 2 uv \frac{\partial^2 u}{\partial x \partial y}+...
    \end{pmatrix} = v \frac{\partial^2 u}{\partial z^2}
\end{equation}
\end{document}

enter image description here

  • 3
    Please, edit your code and replace ... by \dots (or \cdots when not between two plus signs). – Sigur Feb 14 '19 at 13:20
  • 4
    @Sigur I have added the three dots to indicate to OP that he has to complete the equation by himself. The final version of the equation should not have dots within it. – Hafid Boukhoulda Feb 14 '19 at 16:59
2

Borrow a little from all answer and make a little change (such as change v to \nu in the right-hand side)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
    u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}+\lambda_1\begin{pmatrix}
    u^2\frac{\partial^2 u}{\partial x^2}+v\frac{\partial^2 u}{\partial y^2}+w^2\frac{\partial^2 u}{\partial z^2}\\+2uv\frac{\partial^2 u}{\partial x\partial y}+2vw\frac{\partial^2 u}{\partial y\partial z}+2uw\frac{\partial^2 u}{\partial x\partial z}
    \end{pmatrix} = \nu\frac{\partial^2 u}{\partial z^2},
    \tag{1.25}
\end{equation}
\end{document}

0
 \documentclass{article}

\begin{document}
 \[ u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}+ w \frac{\partial u}{\partial z} + \lambda_1 
  \left( \begin{tabular}{c}
 $\:\:\:\:\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} +  \frac{\partial^2 u}{\partial z^2}$\\ 
 $+ 2 u v \frac{\partial^2 u}{\partial x \partial y}+ 2vw  \frac{\partial^2 u}{\partial y\partial z}+2wu  \frac{\partial^2 u}{\partial z \partial u}$\\\end{tabular} \right) = \nu \frac{\partial^2 u}{\partial z^2}\] 
\end{document}

This gives desired output.

campa
  • 31,130
vaman
  • 81
-1
$$u \frac{\partial u}{\partial x}+v \frac{\partial u}{\partial y}+w \frac{\partial u}{\partial z}+\lambda_{1}\left(\begin{array}{c}
u^{2} \frac{\partial^{2} u}{\partial x^{2}}+v^{2} \frac{\partial^{2} u}{\partial y^{2}}+w^{2} \frac{\partial^{2} u}{\partial z^{2}} \\
+2 u v \frac{\partial^{2} u}{\partial x \partial y}+2 v w \frac{\partial^{2} u}{\partial \partial \partial z}+2 u w \frac{\partial^{2} u}{\partial x \partial z}
\end{array}\right)=\nu \frac{\partial^{2} u}{\partial z^{2}}$$
AndréC
  • 24,137
mamman
  • 1
  • 1
    Hi and welcome. I didn't downvote for your answer. Please, expand your answer by giving fully compilable code starting with \documentclass{} and ending with \end{document} – AndréC Aug 09 '20 at 18:27