I need to perform the following operations using Wolfram Mathematica.
I have these equations:
$$a b = c+d+e$$
$$\frac{d}{f}=g h + i$$
$$k=\frac{a}{c}$$
I need to obtain $k$ as a function of: $a,b,c,e,f,g,h,i$
Then I need to put the expression $k$ in the form: $$k= \frac{1}{b}+\frac{(f(g h + i))+e)}{(b c)}$$
I made this code:
In: Solve [a b == c + d + e, a]
Out: {{a -> (c + d + e)/b}}
In: Solve[d/f == g h + i, d]
Out: {{d -> f (g h + i)}}
In: k = a/c /. a -> (c + d + e)/b
Out: (c + d + e)/(b c)
In: k = k /. d -> f (g h + i)
Out: (c + e + f (g h + i))/(b c)
In: Simplify[k]
Out: (c + e + f g h + f i)/(b c)
I have 2 questions:
Is there a simpler way to perform that task? For example, using others commands.
Is there a way to obtain the expression of k in the form $k= \frac{1}{b}+\frac{(f(g h + i))+e)}{(b c)}$ ?
{}
button above the edit window. The edit window help button?
is useful for learning how to format your questions and answers. You may also find the meta Q&A, How to copy code from Mathematica so it looks good on this site, helpful $\endgroup$