LaTeX forum ⇒ Math & Sciencewrong output Topic is solved

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

wrong output

Postby mahbube » Tue Sep 07, 2021 1:34 pm

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

\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 3308 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 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
Bartman
Posts: 306
Joined: Fri Jan 03, 2020 2:39 pm

wrong output  Topic is solved

Postby Bartman » Tue Sep 07, 2021 4:25 pm

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: 9882
Joined: Mon Mar 10, 2008 9:44 pm

wrong output

Postby Stefan Kottwitz » Wed Sep 08, 2021 3:15 pm

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:

\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

Postby mahbube » Wed Sep 08, 2021 8:19 pm

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:

\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.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests