Page 1 of 1

[Solved] Fraction for T₂ = T₁ x (P₂·V₂ over P₁·V₁)

Posted: Mon May 15, 2023 4:00 pm
by mtnylmz
I want to enter a formula including fraction. I want to use multiplication symbol with "times". But it seems that I cannot group elements properly.
I want to make it seem as a fraction by using "over".

Here is the code I am trying: T_2=T_1 times(P_2 times V_2 over (P_1 times V_1)

It appears as following
fractions.png
fractions.png (1.02 KiB) Viewed 10954 times
But it should seem to be T2= T1 x (P2 V2 / P1V1)

Would someone help?

 Edit: Changed subject, was A fraction example 
Make your post understandable by others 
-- MrProgrammer, forum moderator 

Re: A fraction example

Posted: Mon May 15, 2023 5:16 pm
by FJCC
Does this give you what you want?

Code: Select all

T_2 = T_1 times {{P_2 times V_2} over {P_1 times V_1}}

Re: A fraction example

Posted: Mon May 15, 2023 5:27 pm
by Hagar Delest
Note that there is merely a missing ending bracket in your formula. Just a syntax typo.
But brackets are not very pretty, the code from FJCC is way nicer.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.

Re: A fraction example

Posted: Mon May 15, 2023 8:28 pm
by mtnylmz
Thanks it works. But is there any difference between types of paranthesis: (, {, [ ?

Do they all work in the same way? At least that example?

Re: [Solved] Fraction for T2 = T1 x (P2V2 over P1V1)

Posted: Mon May 15, 2023 9:14 pm
by Hagar Delest
Don't know but I'm sure the help files will gives some information. The link to the 4.1 documentation is at the top of the Math forum section.

Re: [Solved] Fraction for T2 = T1 x (P2V2 over P1V1)

Posted: Mon May 15, 2023 9:38 pm
by FJCC
There are many options for brackets in Math. Search the Math help for Brackets to see them. Bare braces are used for grouping parts of the formula and are not displayed but you can write lbrace and rbrace if you want to display braces. The attached document shows a few of the options for our formula.

Re: [Solved] Fraction for T2 = T1 x (P2V2 over P1V1)

Posted: Sat May 20, 2023 5:33 am
by mtnylmz
This is from a very similar example.

This code works: "{(P_b V_b)}over(P_a V_a)=(T_b)over(T_a)"

When I remove { }, the code does not work. Do you have any idea?

Re: Fraction for T2 = T1 x (P2V2 over P1V1)

Posted: Sat May 20, 2023 5:57 am
by FJCC
I don't see any difference in the output between

Code: Select all

{(P_b V_b)}over(P_a V_a)=(T_b)over(T_a)
and

Code: Select all

(P_b V_b)over(P_a V_a)=(T_b)over(T_a)

Re: Fraction for T2 = T1 x (P2V2 over P1V1)

Posted: Sat May 20, 2023 1:22 pm
by Lupp
BTW
If you mean the well-known gas equation, which connects thermodynamic temperatures with pressures and volumes, you should write it like this:

Code: Select all

T sub 2 = T sub 1 cdot {{p sub 2 cdot V sub 2} over {p sub 1 cdot V sub 1}}
or like this (without an explicitly given operator for the ordinary multiplication):

Code: Select all

T sub 2 = T sub 1 {{p sub 2 V sub 2} over {p sub 1 V sub 1}}
By ISO standards the quantity "pressure" is denoted "p" (lower case).
In Mathematics, science and engineering the "large cross" created in Math with the reserved word times should only be used for the "outer" (non-scalar) product of matrices (or vectors) where the result again is a matrix or vector.
When in doubt, you should also prefer a clarifying (additional) pair of curly braces to a slightly shorter but possibly ambiguous notation.