Graphics, Figures & TablesFunction by parts help

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
MakezHD
Posts: 10
Joined: Thu Jan 21, 2016 8:19 pm

Function by parts help

Post by MakezHD »

I'm trying to write a function by parts but when I write everything and compile a (1) appears at the right side and I don't know why. Could someone help me?
Attachments
dfg.jpg
dfg.jpg (64.09 KiB) Viewed 4866 times

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Function by parts help

Post by Johannes_B »

Welcome,

you are using an equation environment, which differs from a usual displayed environment in just one point: It adds the number of the current equation on the right side.

Use \[ your math here \] instead.

By the way, using the cases environment seems to be a good idea.

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\usepackage{blindtext}
\begin{document}
\blindtext
\[ f(x) =
	\begin{cases}
		x^{3} + 3x^{2} + 2x + 1 & x < 0 \\
		\frac{1}{x+1} & 0 \le x
	\end{cases}
\]
\blindtext
\end{document}
Hint: Paste the code as text in your post, i can't copy from an image and typing costs quite some time.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
MakezHD
Posts: 10
Joined: Thu Jan 21, 2016 8:19 pm

Re: Function by parts help

Post by MakezHD »

It worked. Thanks!!
hafizur
Posts: 14
Joined: Sun Nov 22, 2015 11:45 pm

Re: Function by parts help

Post by hafizur »

Eq(1)=> Daily average load =No. of units (kWh) generated in a day/24 hours

Eq(2)=> E=mC^2

where E=Energy
m=mass
C= velocity of light

How can I write this above two equations in this template.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Function by parts help

Post by Stefan Kottwitz »

Hi hafizur,

how is your question related to this topic, function by parts, cases environment with a brace?
Where is the problem? A symbol, alignment, ... ?

Better open a new topic for each of your own question. This topic here is clearly marked as solved, so I guess not many users read again here to see your new question below.

Stefan
LaTeX.org admin
hafizur
Posts: 14
Joined: Sun Nov 22, 2015 11:45 pm

Re: Function by parts help

Post by hafizur »

I know that but this is very important for me that's why I asked here. Thanks for your suggestion.
Post Reply