My project: I want to develop a library that would solve equations. For example: Given input "3x+5=-1" I would like the output x=6  Why? Just for fun, I am learning and am interested in this topic.  What do I already have: I have already written a lexer and parser from scratch. So I am able to compute "3+6*3/(2^3)" etc.  What exactly do I want to do: Given my written lexer and parser (the process uses Reverse Polish Notation which I have researched how to do myself) I would like to expand it with variable recognition and then calculation of those variables. Basically solving linear equations.  My question: Where do I even start on implementing variables or solving equations. I would like to make it work for any linear equation. Just some resources or tips which I can expand upon myself. As this is a learning experience, external libraries are not a solution.  What I would like to do in the future: If I manage to conquer this problem I would like to expand the thing with equation simplification, quadratic equations etc.  How do I approach this? What kind of object structure would I need?
121651
I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++.  Here's an example of the equations:  -44.3940 = a * 50.0 + b * 37.0 + tx -45.3049 = a * 43.0 + b * 39.0 + tx -44.9594 = a * 52.0 + b * 41.0 + tx   From this, I'd like to get the best approximation for a, b, and tx.
36550
\documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{gather*} 6x^2-30x+36=0\\ 6(x^2-5x+6)=0\\ 6(x-2)(x-3)=0\\ x-2=0 \quad \text{or} \quad x-3=0\\ x=2 \quad \text{or} \quad x=3 \end{gather*} \end{document}   Is it ?
19795
When I have equations, as in  \begin{equation} ... \end{equation}   Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), (2.1), (2.2), (2.3), (3.1), (3.2), (4), ...
117620
I have an equation and I would like to uncover part of it at a time.  Take y = 2x + 3.  \begin{equation*} y = 2x + 3 \end{equation*}   I would like to uncover the 3  \begin{equation*} y = 2x + \uncover&lt;2-&gt;{3} \end{equation*}   That syntax for uncover does not seem to do anything.
105972
Solve the following equations for $x, (x ∈ N^+)$  $$ (a)\ 2φ(x) = x;$$ $$(b)\ 3φ(x) = x;$$ $$(c)\ 4φ(x) = x.$$  Can anyone help me with this, or give me some hint?
53085
I link two questions below because I use their solution, to number my equations and generate a list of my equations.   My question about numbering equations:  Generate a list of equations:    Although they might not be directly relevant, I mention I use them because I am not sure if this messes up possible solutions.  Below my MWE. This works fine so far (Figures attached).  But I want the "list name" of my equation (in this case: \myequations{PDE of the diffsion process}) to be available as a kind of variable so that I can refer to it as "The \XXX is given by", where \XXX is a command giving me the Name (\myequations{...}) of the equation I refer to (e.g., \tag{\ref{eq:litdiff}}).  I hope my equation is clear, if not, please tell.  MWE:  \documentclass[12pt]{report} \usepackage{tocloft} \usepackage{amsmath} \usepackage{physics} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}  \newcommand{\listequationsname}{List of Equations} \newlistof{myequations}{equ}{\listequationsname} \newcommand{\myequations}[1]{% \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par} \setlength{\cftmyequationsnumwidth}{2.5em}  \newcommand{\subs}{\text{s}}  \begin{document}  \listofmyequations  \chapter{Diffsion}  The PDE of the diffsion process is given by \begin{subequations}\label{eq:litdiff} \begin{equation} \pdv{}{t} (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})=\frac{D_{\subs}}{r^{2}}\pdv{}{r} \left(r^{2}\frac{\partial (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})}{\partial r}\right) \tag{\ref{eq:litdiff}} \end{equation} \myequations{PDE of the diffsion process} \noindent The boundary conditions of Eq.~\eqref{eq:litdiff} are given by \begin{align} D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(0,z,t) &amp;= 0 \label{eq:diffusionpartialdiff_boundaries0}\\ D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(R_{\subs},z,t) &amp;= -j(z,t)\label{eq:diffusionpartialdiff_boundariesRs} \end{align} and the initial condition is given by     \begin{equation}         \widetilde{c}_{\subs}(r,z,0) = 0 \quad r\in [0;R_{\subs}].     \label{eq:diffusionpartialdiff_init}     \end{equation} \end{subequations}  \end{document}
41694
Can anyone help me with a practical application of linear transformations? I am very curious about how can be an application in real life that can be solved with a linear transformation.
42073
is there a general solution to that? I have seen simple examples for Y+X=Z but I was wondering how this would be with rescaling?
30263
I just read a book "Linear Algebra and Its Applications 4E" by David C. Lay. The book is (should be) LaTeX typeset. The matrix and equations are so nice, please see the following 3 examples:        It's so beautiful, so I want get the same effect inside my paper. Here is my code:   \usepackage{amsmath} \usepackage{colortbl} \newcommand\y{\cellcolor{clight2}} \definecolor{clight2}{RGB}{212, 237, 244}%  %%% \[A=\left[ \begin{array}{ccccc} \y 0 &amp; -3 &amp; -6 &amp; 4 &amp; 9 \\    -1 &amp; \y -2 &amp; -1 &amp; 3 &amp; 1 \\ -2 &amp; -3 &amp; 0 &amp; \y 3 &amp; -1 \\ 1 &amp; 4 &amp; 5 &amp; -9 &amp; -7      \end{array} \right]\]  \[A=\left[\begin{array}{cccccc} \rowcolor{clight2} 3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15\\ 0 &amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\ 0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \end{array} \right]\]   And the result:     But how to add these arrows??
106756
Like prompt says, I want a command to allow quicker mathematical equations. I have created my own commands in the past but cant figure this out.  Ideally I would end up with a shortcut like \m or Alt+M that would type $$ and then press the left arrow key.    If this cannot be done native to TeXstudio, could someone suggest a good minimalist macro program to make this work?
118295
I would like to produce quadratic equation with integer coefficients.  Here's my code using pgfmath.  \documentclass{article} \usepackage{tikz} \pgfmathsetseed{\pdfuniformdeviate 10000000}  \begin{document} $\pgfmathdeclarerandomlist{signe}{{+}{-}}% \pgfmathrandomitem{\s}{signe}% \pgfmathparse{random(2)}% \pgfmathparse{ifthenelse(\pgfmathresult==1,"-"," ")}\pgfmathresult \pgfmathrandominteger{\a}{1}{6} \pgfmathparse{ifthenelse(\a==1," x^{2} ","\a x^{2}")}\pgfmathresult % coeff a \pgfmathdeclarerandomlist{lincoeff}{{}{2}{3}{4}{5}{6}} \pgfmathrandomitem{\b}{lincoeff}% \pgfmathrandomitem{\s'}{signe}% \pgfmathsetmacro{\e}{random(0,6)} \pgfmathparse{ifthenelse(\e==0," ", " \s' \b x ")}\pgfmathresult % coeff b \pgfmathrandominteger{\c}{0}{6} \pgfmathrandomitem{\s''}{signe}% \pgfmathparse{ifthenelse(\c==0,"","\s'' \c")}\pgfmathresult % coeff c =0$ \end{document}   It works but it seems to be not a good way, I had some pain with the x-coeficient and my solution looks complicated. I tried to use an ifthenelse inside an other ifthenelse but without success. Is there a better way ?
48035
I am trying to add equation names besides the equation numbers but, in addition, in such a way that \eqref inserts just the number.  Inspired by the top answer in , I tried the following solution:   \documentclass{article} \usepackage{amsmath} \newcommand\mylabel[2]{\label{#1} \\[-\baselineskip] \tag*{#2\ \hphantom{(\ref{#1})}}}  \begin{document}  \begin{align} f(x) = a \mylabel{eq:a}{Constant} \\ h(x) = ax^2+bx+c \mylabel{eq:b}{Quadratic} \end{align}  Equations \eqref{eq:a} and \eqref{eq:b} look OK\dots   \begin{align} j(x) = \varinjlim_{C_j} \mylabel{eq:c}{Way too low!} \end{align}  \dots but the method fails in style for Equation \eqref{eq:c}.  \end{document}      As you can see, the trick I used is to write the equation name in a new line and then lift it by -\baselineskip. For simple equations as (1) or (2) I get exactly what I want. But indeed, this is shoddy work and it fails as soon as the equation gets a little more complicated, e.g. for (3).   I don't know whether I could use another length instead of -\baselineskip so that I always get the correct lift, or whether there is a more elegant (and not too complicated) way to achieve what I want.
60457
I am extremely new to mathematics, and I don't have much training except for the basics so please excuse my rather basic question.  The question itself:  If I have the relationship $e^x + x - 2 = 0$;  and $k$ is the number of solutions in $[0,1]$ and $n$ is the number of solutions not in $[0,1]$  what is $k$? what is $n$?  My Questions (sorry if they are many)  (1) What is the proper name for this type of equation. It doesn't seem to be a function, just a relationship of one variable to some constants.  (2) How do you tell how many solutions an equation like this has just from looking at it? It seems like if you have an equation like $x^2 + 2x + 5 = 0$; you have at least two solutions. But what about the $e^x$? How do you predict how many solutions there will be then?  (3) Once I re-arrange the equation to $e^x + x = 2$; what algebraic steps could I follow if I wanted to find the exact solution?
105541
I have an equation that is too long to fit on one line:  x = a + b + c + d + e + f   as an example of what it looks like. What is the correct way to handle this? Do i break it up over multiple lines? Do I decrease the font? I am using LyX as my editor.
93636
I want to manually label equation number ? For example I want to label this equation 3.1 instead of (1) which automatically pops up. Is it also possible in split environment as well or not ?      \begin{equation}     \log \mu_{ijk}= \lambda + \lambda_i ^I + \lambda_j ^J+\lambda_k ^K+\lambda_{ij} ^{IJ}+\lambda_{ik} ^{IK}+\lambda_{jk} ^{JK}+\lambda_{ijk} ^{IJK} \label{eq:3.1}     \end{equation}
36757
I am writing two equations in an align environment:  \begin{align} x^2+y^2=z^2, \\ x^2=7, \end{align}   I would like the first equation to be labelled with e.g. (1.1) and the second equation to be labelled (1.1'), rather than (1.2).  Is this possible to automate? Do I need to use a hack to manually place the equation number after my second equation? e.g.  \newcommand{\hack}{\hfill({\eqnum}')} % Sketch - I don't know what command to use. \begin{align} x^2+y^2=z^2, \\\nonumber x^2=7,\hack \end{align}   If so, what command can I use to get the equation number? i.e. what should my command \hack be?
65248
I'm getting errors in a matrix equation. When I compile it looks fine, but I'd like to fix them so I don't have to press return for every error at compile time. The code for the equation is:  \begin{equation*}  \begin{bmatrix} U(1,t)  &amp; \cdots &amp; U(n,t) \\  \vdots &amp; \ddots &amp; \vdots \\ O_{n1} &amp; \cdots &amp; O_{nn}  \end{bmatrix} \times \begin{bmatrix} W(1,1)  &amp; \cdots &amp; W(1,n) \\  \vdots &amp; \ddots &amp; \vdots \\  W(n,1) &amp; \cdots &amp; W(n,n)  \end{bmatrix} = \begin{bmatrix}  D(1,t)  &amp; \cdots &amp; D(n,t) \\ \vdots &amp; \ddots &amp; \vdots \\ I_{n1} &amp; \cdots &amp; I_{nn} \end{bmatrix}  \end{equation*}   The errors I'm getting are related to missing $'s inserted.