Math & Sciencewrong output

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mahbube
Posts: 5
Joined: Tue Sep 07, 2021 12:29 am

wrong output

Post by mahbube »

My code isn't working and I don't know why?

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\dfrac{c[(1-p)^{\frac{-1}{c}}-1]}{p\left[c{(1-p^{\frac{-1}{c}-1}+1\right]}$
\end{document}
Attachments
Captureeere.PNG
Captureeere.PNG (3.06 KiB) Viewed 5101 times
Last edited by Stefan Kottwitz on Wed Sep 08, 2021 3:12 pm, edited 4 times in total.
Reason: document frame and amsmath added

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

wrong output

Post by Bartman »

Please provide a Infominimal working example and mark your code.

A right brace after the \frac command in the denominator is missing to avoid an error message and to approximate the output in the figure.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

wrong output

Post by Stefan Kottwitz »

It's may be what Bartman said - but you seem to have a brace in the formula picture: to get a curly brace in the output, quote it by a backslash, \{. See and try some code, click the "Run LaTeX here" button:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\dfrac{c[(1-p)^{\frac{-1}{c}}-1]}{p\left[c\{(1-p^{\frac{-1}{c}-1}+1\right]}$
\end{document}
If have an opening brace in a formula, you should have a closing brace. That's for input and for output.

Stefan
LaTeX.org admin
mahbube
Posts: 5
Joined: Tue Sep 07, 2021 12:29 am

wrong output

Post by mahbube »

Stefan Kottwitz wrote:It's may be what Bartman said - but you seem to have a brace in the formula picture: to get a curly brace in the output, quote it by a backslash, \{. See and try some code, click the "Run LaTeX here" button:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\dfrac{c[(1-p)^{\frac{-1}{c}}-1]}{p\left[c\{(1-p^{\frac{-1}{c}-1}+1\right]}$
\end{document}
If have an opening brace in a formula, you should have a closing brace. That's for input and for output.

Stefan
thank you.
Post Reply