Working With Symbolics

Embed Size (px)

Citation preview

  • 7/30/2019 Working With Symbolics

    1/7

    WORKING WITH SYMBOLICS

  • 7/30/2019 Working With Symbolics

    2/7

    About Working with SymbolicsTo perform complex symbolic operations, you include keywords andmodifiers that specify the type of symbolic manipulation you want toperform on the expression.You can modify a keywords functionality by using arguments or modifiersor both. For example, in float, 7, 7 is the argument.A list of operations you can perform with symbolic keywords and modifiersfollows: Calculus operations Factoring and expanding expressions Simplifying and rewriting expressions Operations on variables

    http://127.0.0.1:60477/mprime_en/mprime/about_symbolic_calculus.html#about_symbolic_calculus_AboutSymbolicCalculus-0380C63C154_59http://127.0.0.1:60477/mprime_en/mprime/about_symbolic_calculus.html#about_symbolic_calculus_AboutSymbolicCalculus-0380C63C154_59http://127.0.0.1:60477/mprime_en/mprime/about_factoring_and_expanding_expressions.html#about_factoring_and_expanding_expressions_FactoringAndEx823_14http://127.0.0.1:60477/mprime_en/mprime/about_factoring_and_expanding_expressions.html#about_factoring_and_expanding_expressions_FactoringAndEx823_14http://127.0.0.1:60477/mprime_en/mprime/about_simplifying_and_rewriting_expressions.html#about_simplifying_and_rewriting_expressions_AboutSimplif823_17http://127.0.0.1:60477/mprime_en/mprime/about_simplifying_and_rewriting_expressions.html#about_simplifying_and_rewriting_expressions_AboutSimplif823_17http://127.0.0.1:60477/mprime_en/mprime/about_working_with_variables_in_symbolic_expressions.html#about_working_with_variables_in_symbolic_expressions_Abo823_20http://127.0.0.1:60477/mprime_en/mprime/about_working_with_variables_in_symbolic_expressions.html#about_working_with_variables_in_symbolic_expressions_Abo823_20http://127.0.0.1:60477/mprime_en/mprime/about_working_with_variables_in_symbolic_expressions.html#about_working_with_variables_in_symbolic_expressions_Abo823_20http://127.0.0.1:60477/mprime_en/mprime/about_simplifying_and_rewriting_expressions.html#about_simplifying_and_rewriting_expressions_AboutSimplif823_17http://127.0.0.1:60477/mprime_en/mprime/about_factoring_and_expanding_expressions.html#about_factoring_and_expanding_expressions_FactoringAndEx823_14http://127.0.0.1:60477/mprime_en/mprime/about_symbolic_calculus.html#about_symbolic_calculus_AboutSymbolicCalculus-0380C63C154_59
  • 7/30/2019 Working With Symbolics

    3/7

    To Solve Equations Symbolically

    Type the equation to solve using the Boolean equal to operator. Insertthe symbolic evaluation operator, type the keyword solve in theplaceholder, and then press Enter or click anywhere. Mathcad returnssymbolic solutions to the equation, if possible. Otherwise, it returnsnumeric solutions. If the equation you are trying to solve has more thanone solution, Mathcad returns the solutions in a vector, unless thesolution is periodic.

    To solve an equation whose right-hand side is set to 0, you only need totype the left-hand side of the equation.

    If the equation contains more than one variable, specify a comma-separated list of variables you want to solve for after solve.

    If your equation includes numbers with decimal points, solve returns adecimal answer.

    To solve an equation subject to restrictions on the domain of thevariable, for example, solving over the real numbers, use the keywordassume and a modifier with solve.

    If an equation has a periodic solution, solve returns a single value from

    the set of solutions.

  • 7/30/2019 Working With Symbolics

    4/7

    To see a more detailed solution, add the modifier fully after solve.

    Mathcad returns the solution in terms of a newly generated variable thatrepresents an arbitrary integer. The generated variable is preceded byan underscore to avoid conflicts with other variables you might havedefined elsewhere in the worksheet.

    To solve a system of equations symbolically, you can create a columnvector with each element holding one equation in the system, and solveusing the symbolics operator, specifying a column vector or a comma-

    separated list of system variables after the solve keyword. To solve an inequality, use >, 0.

    Solving systems of equations, inequality equations, or periodicequations may produce some special results that do not have meaningwhen evaluated numerically.

    You can find roots numerically using the root function, solve linearsystems numerically using the lsolve function, or solve linear ornonlinear systems using a solve block.

  • 7/30/2019 Working With Symbolics

    5/7

    To Control the Number of Decimal Places in Results

    1.Place the cursor at the end of the expression you want to evaluate,insert the symbolic evaluation operator, and type the keyword float inthe placeholder.

    2. Press Enter to evaluate the expression.

    NoteThe default number of result digits when using the keyword float is 20.

    3.Type a number after float to specify a different number of displayeddigits.

    Reducing the number of computed digits reduces the accuracy of theresult. Do not use float as a way of reducing the size of the displayedresult. To reduce the number of displayed digits without affecting theaccuracy of the result, type integers in the expression in decimal form.

    Type the basic symbolic evaluation

    Type the same expression in decimal form:

    Use the float modifier and specify the number of digits to display

  • 7/30/2019 Working With Symbolics

    6/7

    To Find the Coefficients of a Polynomial

    Choose one or more of the methods below:

    1. Place the cursor at the end of the polynomial, insert the symbolicevaluation operator, and type the keyword coeffs in theplaceholder.

    Here, the first entry of the vector is 0 because the constant term of thepolynomial is 0.

    2. To return a second column containing the exponentscorresponding to each coefficient, type the optional modifierdegree after coeffs.

    3. If the polynomial contains more than one variable, type a commaafter coeffs, followed by the variable with respect to which youwant the coefficients expressed. Mathcad returns a vector

    containing the coefficients of the polynomial. If all the exponentsare positive, the first element of the vector corresponds to theconstant term. If all exponents are negative, the last elementcorresponds to the constant term. Otherwise, Mathcad returns thecoefficients for the smallest exponent to the largest, in order, withzeros for any skipped exponents in the expression, and alwaysincluding the constant term.

    For an expression containing several variables, Mathcad writes theexpression as a polynomial in the variable you specify after coeffs and inthis case x. This is the same operation that the keyword collectperforms.

    The coefficients that Mathcad returns are expressions involving thevariables other than the one you specify, so if you specify variable y,Mathcad returns the following result:

  • 7/30/2019 Working With Symbolics

    7/7

    About Symbolic Calculus

    With Mathcad you can perform the following calculus operations

    symbolically:

    Limits

    Derivatives and integrals

    Partial fractions

    Taylor series

    Continued fractions

    Symbolic transformsFourier, Laplace, and z-transforms, and their

    inverses