Math & ScienceError in Equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Amitavo Roy
Posts: 14
Joined: Sat Apr 06, 2013 11:50 am

Error in Equation

Post by Amitavo Roy »

This code lines are not running...I tryed it so many times...but unfortunately I dint succeeded....Please suggest me what is wrong in this code....

Code: Select all

\begin{multline}

tilde{\overline{P}}= \overline{P}_{n}+\bigtriangleup z \left [
\left \{ \frac{\overline{a}_{n}\gamma_{n}+j(\Omega _0 - \Omega
_{f}\gamma _{n})\overline{P}_{n}}{u_{z,n}} \right \} \right
+ jMag_{n}\overline{P}_{n} ]\\

\overline{u}_{z,n+1}= \overline{u}_{z,n} + \Delta z \left \{\left
( -\frac{|\overline{p}_{n}|^{2}}{\overline{u}_{z,n}} \right
).Mag_{n} \overline{p}_{n} \right \}\\

\tilde{\gamma}_{n+1} = \frac{1}{\sqrt {1-(v/c)^{2}}} =
\sqrt{1+\tilde{u}^{2}_{z,n+1}+|\tilde{\overline{p}}_{n+1}|^{2}}\\

\overline{p}_{n+1}=\overline{p}_{n} + \frac{\Delta z}{2}\left [
\left ( \frac{\overline{a}_{n+1}\gamma_{n}+j(\Omega _0 - \Omega
_{f}\gamma _{n+1})\tilde{\overline{P}}_{n+1}}{u_{z,n+1}} + j
Mag_{n+1}\tilde{\overline{P}}_{n+1}\right ) + \left(
\frac{\overline{a}_{n}\gamma_{n}+j(\Omega _0 - \Omega _{f}\gamma
_{n})\overline{P}_{n}}{u_{z,n}} + j Mag_{n}\overline{P}_{n}\right
) \right ]

\end{multline}
Last edited by cgnieder on Sun Apr 07, 2013 10:56 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Error in Equation

Post by cgnieder »

Since this is your second question about basically the same problem may I suggest you try to get some structure in you code: use indentation and several lines. Since this is a math formula and in math mode spaces are ignored there is no harm in doing it but it gives you a better view over what your doing.

The following is the first of the blocks you posted. I didn't add or remove anything but simply applied my advice to show you what I mean. Hopefully this helps you in finding what's wrong:

Code: Select all

  \tilde{\overline{P}}
  =
  \overline{P}_{n} + \bigtriangleup z
  \left[
    \left\{
      \frac
        {
          \overline{a}_{n}\gamma_{n}
          +
          j(\Omega _0 - \Omega_{f}\gamma _{n})
          \overline{P}_{n}
        }
        {u_{z,n}}
    \right\}
  \right
  +
  jMag_{n}\overline{P}_{n} ]
  \\
Regards
site moderator & package author
Amitavo Roy
Posts: 14
Joined: Sat Apr 06, 2013 11:50 am

Re: Error in Equation

Post by Amitavo Roy »

Thanks a lot...
Ya I found my error....it is in my first block only...
Thanks...I will do accordingly...
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Error in Equation

Post by svend_tveskaeg »

Next time, you should make a minimal working example. Thorsten has already mentioned this here.

Furthermore, try and follow the suggestions about making the code more readable, as done here.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply