AreSameSolution - Maple Help

LinearFunctionalSystems

 IsSolution
 test the solution of a linear functional system
 AreSameSolution
 test if solutions of a linear functional system are equivalent

 Calling Sequence IsSolution(sol, sys, vars) IsSolution(sol, A, b, x, case) IsSolution(sol, A, x, case) AreSameSolution(sol, sol1, x)

Parameters

 sol - solution to be checked sys - list of equations; linear functional system vars - list of function variables such as [y1(x), y2(x), ...]; variables to solve for A - Matrix with rational elements b - Vector with rational elements x - the independent variable, for example x case - name indicating the case of the system; one of 'differential', 'difference', or 'qdifference' sol1 - solution to be compared with

Description

 • The IsSolution function returns true if sys is a linear functional system of equations with polynomial coefficients and sol is the solution of the linear functional system. Otherwise, the quasidegrees (see below) of the results of substitution are returned.
 The system parameter is entered either in list form (a list of equations sys and a list of function variables vars to solve for), or in matrix form (Matrix A, Vector b, and the independent variable x, where the Vector b is optional).
 The matrix form specifies the system $\mathrm{Ly}\left(x\right)=\mathrm{Ay}\left(x\right)+b$, where L is the operator (either differential, difference, or q-difference), $y\left(x\right)$ is the vector of the functions to solve for, A is a rational matrix, and b is a rational vector (right-hand side).
 For the matrix from of the calling sequence, the case of the system must be specified as one of 'differential', 'difference', or 'qdifference'. If b is not specified, the system is assumed to be homogeneous.
 The function IsSolution substitutes sol for the function variables and checks the result. If the given solutions is correct then 'true' is returned. Otherwise, for each component of the result of the substitution is computed and its quasidegree is returned. If the component is a polynomial then the quasidegree is the ordinary degree of the polynomial. If the component is in the form ${x}^{\mathrm{\lambda }}p\left(x\right)$ where $p\left(x\right)$ is a polynomial and lamdba is an algebraic number then the quasidegree is  equal to $\mathrm{\lambda }+\mathrm{degree}\left(p\left(x\right),x\right)$. If the component is rational then the quasidegree is equal to the difference of the quasidegree of the numerator and the quasidegree of the denominator. If the component is a polynomial in $\mathrm{ln}\left(x\right)$ (as a result of the substitution of a regular solution) then the quasidegree is the list of quasidegrees of the coefficients in respect of $\mathrm{ln}\left(x\right)$. Otherwise the quasidegree is undefined and FAIL is returned.
 • The AreSameSolution function returns true if the solutions sol and sol1 are equivalent. Otherwise, false is returned.
 The function checks that the numbers of linear independent solutions in sol and sol1 are equal, as well as the degrees in x.
 • The error conditions associated with these functions are the same as those which are generated by LinearFunctionalSystems[Properties].
 • This function is part of the LinearFunctionalSystems package, and so it can be used in the form IsSolution(..) only after executing the command with(LinearFunctionalSystems). However, it can always be accessed through the long form of the command by using the form LinearFunctionalSystems[IsSolution](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearFunctionalSystems}\right):$
 > $\mathrm{sys}≔\left[\mathrm{diff}\left(\mathrm{y1}\left(x\right),x\right)-\mathrm{y2}\left(x\right),\mathrm{diff}\left(\mathrm{y2}\left(x\right),x\right)-\mathrm{y3}\left(x\right)-\mathrm{y4}\left(x\right),\mathrm{diff}\left(\mathrm{y3}\left(x\right),x\right)-\mathrm{y5}\left(x\right),\mathrm{diff}\left(\mathrm{y4}\left(x\right),x\right)-2\mathrm{y1}\left(x\right)-2x\mathrm{y2}\left(x\right)-\mathrm{y5}\left(x\right),\mathrm{diff}\left(\mathrm{y5}\left(x\right),x\right)-{x}^{2}\mathrm{y1}\left(x\right)-2x\mathrm{y3}\left(x\right)-\mathrm{y6}\left(x\right),\mathrm{diff}\left(\mathrm{y6}\left(x\right),x\right)-{x}^{2}\mathrm{y2}\left(x\right)+2\mathrm{y3}\left(x\right)\right]:$
 > $\mathrm{vars}≔\left[\mathrm{y1}\left(x\right),\mathrm{y2}\left(x\right),\mathrm{y3}\left(x\right),\mathrm{y4}\left(x\right),\mathrm{y5}\left(x\right),\mathrm{y6}\left(x\right)\right]:$
 > $\mathrm{sol}≔\mathrm{PolynomialSolution}\left(\mathrm{sys},\mathrm{vars}\right)$
 ${\mathrm{sol}}{≔}\left[{x}{}{{\mathrm{_c}}}_{{3}}{+}{{\mathrm{_c}}}_{{2}}{,}{{\mathrm{_c}}}_{{3}}{,}{-}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{-}{x}{}{{\mathrm{_c}}}_{{2}}{+}{{\mathrm{_c}}}_{{1}}{,}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{+}{x}{}{{\mathrm{_c}}}_{{2}}{-}{{\mathrm{_c}}}_{{1}}{,}{-}{2}{}{x}{}{{\mathrm{_c}}}_{{3}}{-}{{\mathrm{_c}}}_{{2}}{,}{{x}}^{{3}}{}{{\mathrm{_c}}}_{{3}}{+}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{2}}{-}{2}{}{x}{}{{\mathrm{_c}}}_{{1}}{-}{2}{}{{\mathrm{_c}}}_{{3}}\right]$ (1)
 > $\mathrm{IsSolution}\left(\mathrm{sol},\mathrm{sys},\mathrm{vars}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{sol1}≔\left[-\mathrm{_c}\left[1\right]+x\mathrm{_c}\left[3\right],\mathrm{_c}\left[3\right],-\mathrm{_c}\left[2\right]+x\mathrm{_c}\left[1\right]-{x}^{2}\mathrm{_c}\left[3\right],\mathrm{_c}\left[2\right]-x\mathrm{_c}\left[1\right]+{x}^{2}\mathrm{_c}\left[3\right],\mathrm{_c}\left[1\right]-2x\mathrm{_c}\left[3\right],-2\mathrm{_c}\left[3\right]+2x\mathrm{_c}\left[2\right]-{x}^{2}\mathrm{_c}\left[1\right]+{x}^{3}\mathrm{_c}\left[3\right]\right]$
 ${\mathrm{sol1}}{≔}\left[{x}{}{{\mathrm{_c}}}_{{3}}{-}{{\mathrm{_c}}}_{{1}}{,}{{\mathrm{_c}}}_{{3}}{,}{-}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{+}{x}{}{{\mathrm{_c}}}_{{1}}{-}{{\mathrm{_c}}}_{{2}}{,}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{-}{x}{}{{\mathrm{_c}}}_{{1}}{+}{{\mathrm{_c}}}_{{2}}{,}{-}{2}{}{x}{}{{\mathrm{_c}}}_{{3}}{+}{{\mathrm{_c}}}_{{1}}{,}{{x}}^{{3}}{}{{\mathrm{_c}}}_{{3}}{-}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{1}}{+}{2}{}{x}{}{{\mathrm{_c}}}_{{2}}{-}{2}{}{{\mathrm{_c}}}_{{3}}\right]$ (3)
 > $\mathrm{IsSolution}\left(\mathrm{sol1},\mathrm{sys},\mathrm{vars}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{AreSameSolution}\left(\mathrm{sol},\mathrm{sol1},x\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{sol}\left[1\right]≔1$
 ${{\mathrm{sol}}}_{{1}}{≔}{1}$ (6)
 > $\mathrm{IsSolution}\left(\mathrm{sol},\mathrm{sys},\mathrm{vars}\right)$
 $\left[{0}{,}{-}{\mathrm{\infty }}{,}{-}{\mathrm{\infty }}{,}{1}{,}{3}{,}{-}{\mathrm{\infty }}\right]$ (7)
 > $\mathrm{sol2}≔\mathrm{eval}\left(\mathrm{sol1},\mathrm{_c}\left[1\right]=0\right)$
 ${\mathrm{sol2}}{≔}\left[{x}{}{{\mathrm{_c}}}_{{3}}{,}{{\mathrm{_c}}}_{{3}}{,}{-}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{-}{{\mathrm{_c}}}_{{2}}{,}{{x}}^{{2}}{}{{\mathrm{_c}}}_{{3}}{+}{{\mathrm{_c}}}_{{2}}{,}{-}{2}{}{x}{}{{\mathrm{_c}}}_{{3}}{,}{{x}}^{{3}}{}{{\mathrm{_c}}}_{{3}}{+}{2}{}{x}{}{{\mathrm{_c}}}_{{2}}{-}{2}{}{{\mathrm{_c}}}_{{3}}\right]$ (8)
 > $\mathrm{IsSolution}\left(\mathrm{sol2},\mathrm{sys},\mathrm{vars}\right)$
 ${\mathrm{true}}$ (9)
 > $\mathrm{AreSameSolution}\left(\mathrm{sol1},\mathrm{sol2},x\right)$
 ${\mathrm{false}}$ (10)
 > $\mathrm{sol}\left[1\right]≔x\mathrm{ln}\left(x\right)+1$
 ${{\mathrm{sol}}}_{{1}}{≔}{x}{}{\mathrm{ln}}{}\left({x}\right){+}{1}$ (11)
 > $\mathrm{IsSolution}\left(\mathrm{sol},\mathrm{sys},\mathrm{vars}\right)$
 $\left[\left[{0}{,}{0}\right]{,}{-}{\mathrm{\infty }}{,}{-}{\mathrm{\infty }}{,}\left[{1}{,}{1}\right]{,}\left[{3}{,}{3}\right]{,}{-}{\mathrm{\infty }}\right]$ (12)