MaplePrimes - Questions and Posts tagged with symbolic
http://www.mapleprimes.com/tags/symbolic
en-us2017 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemMon, 27 Mar 2017 14:29:04 GMTMon, 27 Mar 2017 14:29:04 GMTThe most recent questions and posts on MaplePrimes tagged with symbolichttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Questions and Posts tagged with symbolic
http://www.mapleprimes.com/tags/symbolic
differences between numerical and symbolic solution in eigendecompostion of symmetric matrix?
http://www.mapleprimes.com/questions/221363-Differences-Between--Numerical-And-Symbolic?ref=Feed:MaplePrimes:Tagged With symbolic
<p>Dear Maple experts,</p>
<p>I am struggling with a difference between the symbolic and numerical solution of an eigendecomposition of a symmetric positive definite matrix. Numerically the solution seems correct, but the symbolic solution puzzles me. In the symbolic solution the reconstructed matrix is different from the original matrix (although the difference between the original and the reconstructed matrix seems to be related to an unknown scalar multiplier.</p>
<p>restart;<br>
with(LinearAlgebra);<br>
Lambda := Matrix(5, 1, symbol = lambda);<br>
Theta := Matrix(5, 5, shape = diagonal, symbol = theta);<br>
#Ω is the matrix that will be diagonalized.<br>
Omega := MatrixPower(Theta, -1/2) . Lambda . Lambda^%T . MatrixPower(Theta, -1/2);<br>
#Ω is symmetric and in practice always positive definite, but I do not know how to specify the assumption of positivess definiteness in Maple<br>
IsMatrixShape(Omega, symmetric);</p>
<p># the matrix Omega is very simple and Maple finds a symbolic solution<br>
E, V := Eigenvectors(Omega);</p>
<p># this will not return the original matrix</p>
<p>simplify(V . DiagonalMatrix(E) . V^%T)</p>
<p># check this numerically with the following values.</p>
<p>lambda[1, 1] := .9;lambda[2, 1] := .8;lambda[3, 1] := .7;lambda[4, 1] := .85;lambda[5, 1] := .7;<br>
theta[1, 1] := .25;theta[2, 2] := .21;theta[3, 3] := .20;theta[4, 4] := .15;theta[5, 5] := .35;</p>
<p>The dotproduct is not always zero, although I thought that the eigenvectors should be orthogonal.</p>
<p>I know eigenvector solutions may be different because of scalar multiples, but here I am not able to understand the differences between the numerical and symbolic solution.</p>
<p>I probably missed something, but I spend the whole saturday trying to solve this problem, but I can not find it.</p>
<p>I attached both files.</p>
<p>Anyone? Thank in advance,</p>
<p>Harry</p>
<p><a href="/view.aspx?sf=221363_question/eigendecomposition_numeric.mw">eigendecomposition_numeric.mw</a></p>
<p><a href="/view.aspx?sf=221363_question/eigendecomposition_symbolic.mw">eigendecomposition_symbolic.mw</a></p>
<p>Dear Maple experts,</p>
<p>I am struggling with a difference between the symbolic and numerical solution of an eigendecomposition of a symmetric positive definite matrix. Numerically the solution seems correct, but the symbolic solution puzzles me. In the symbolic solution the reconstructed matrix is different from the original matrix (although the difference between the original and the reconstructed matrix seems to be related to an unknown scalar multiplier.</p>
<p>restart;<br>
with(LinearAlgebra);<br>
Lambda := Matrix(5, 1, symbol = lambda);<br>
Theta := Matrix(5, 5, shape = diagonal, symbol = theta);<br>
#Ω is the matrix that will be diagonalized.<br>
Omega := MatrixPower(Theta, -1/2) . Lambda . Lambda^%T . MatrixPower(Theta, -1/2);<br>
#Ω is symmetric and in practice always positive definite, but I do not know how to specify the assumption of positivess definiteness in Maple<br>
IsMatrixShape(Omega, symmetric);</p>
<p># the matrix Omega is very simple and Maple finds a symbolic solution<br>
E, V := Eigenvectors(Omega);</p>
<p># this will not return the original matrix</p>
<p>simplify(V . DiagonalMatrix(E) . V^%T)</p>
<p># check this numerically with the following values.</p>
<p>lambda[1, 1] := .9;lambda[2, 1] := .8;lambda[3, 1] := .7;lambda[4, 1] := .85;lambda[5, 1] := .7;<br>
theta[1, 1] := .25;theta[2, 2] := .21;theta[3, 3] := .20;theta[4, 4] := .15;theta[5, 5] := .35;</p>
<p>The dotproduct is not always zero, although I thought that the eigenvectors should be orthogonal.</p>
<p>I know eigenvector solutions may be different because of scalar multiples, but here I am not able to understand the differences between the numerical and symbolic solution.</p>
<p>I probably missed something, but I spend the whole saturday trying to solve this problem, but I can not find it.</p>
<p>I attached both files.</p>
<p>Anyone? Thank in advance,</p>
<p>Harry</p>
<p><a href="/view.aspx?sf=221363_question/eigendecomposition_numeric.mw">eigendecomposition_numeric.mw</a></p>
<p><a href="/view.aspx?sf=221363_question/eigendecomposition_symbolic.mw">eigendecomposition_symbolic.mw</a></p>
221363Sat, 04 Mar 2017 21:46:19 ZHarry GarstHarry GarstMaple Formula Input
http://www.mapleprimes.com/questions/220308-Maple-Formula-Input?ref=Feed:MaplePrimes:Tagged With symbolic
<p>Hallo,</p>
<p>im currently using Mathcad 15 and i want to change to a newer and better software with more possibilities.</p>
<p>But up to now i have not found a better software for calculating. One big advantage with mathcad is the possibilitie of symbolic formula input and calculation with units.</p>
<p>Now my question: Is it possible with Maple to write symbolic formulas (2D Structure of big formulas)</p>
<p>I dont write a formula in one row. Its nearly impossible ...</p>
<p>And can i calculate with units?</p>
<p>Thx Stefan</p>
<p> </p>
<p>Hallo,</p>
<p>im currently using Mathcad 15 and i want to change to a newer and better software with more possibilities.</p>
<p>But up to now i have not found a better software for calculating. One big advantage with mathcad is the possibilitie of symbolic formula input and calculation with units.</p>
<p>Now my question: Is it possible with Maple to write symbolic formulas (2D Structure of big formulas)</p>
<p>I dont write a formula in one row. Its nearly impossible ...</p>
<p>And can i calculate with units?</p>
<p>Thx Stefan</p>
<p> </p>
220308Sun, 04 Dec 2016 07:18:57 ZsolettosolettoHow can I solve this symbolic nonlinear system?
http://www.mapleprimes.com/questions/220112-How-Can-I-Solve-This-Symbolic-Nonlinear-System?ref=Feed:MaplePrimes:Tagged With symbolic
<p>I meet a interesting nonlinear system in the analysis of an mechanics problem. This system can be shown as following:</p>
<p><img src="/view.aspx?sf=220112_question/QQ截图20161123191735.jpg"></p>
<p>wherein, the X and Y is the solutions. A, B, S, and T is the symbolic parameters.</p>
<p>I want to express X and Y with A, B, S, T. Who can give me a help, thanks a lot!</p>
<p>PS:the mw file is given here.</p>
<p><a href="/view.aspx?sf=220112_question/A_symbolic_nonlinear_system.mw">A_symbolic_nonlinear_system.mw</a></p>
<p>I meet a interesting nonlinear system in the analysis of an mechanics problem. This system can be shown as following:</p>
<p><img src="/view.aspx?sf=220112_question/QQ截图20161123191735.jpg"></p>
<p>wherein, the X and Y is the solutions. A, B, S, and T is the symbolic parameters.</p>
<p>I want to express X and Y with A, B, S, T. Who can give me a help, thanks a lot!</p>
<p>PS:the mw file is given here.</p>
<p><a href="/view.aspx?sf=220112_question/A_symbolic_nonlinear_system.mw">A_symbolic_nonlinear_system.mw</a></p>
220112Wed, 23 Nov 2016 11:26:42 ZarousecoolarousecoolHow to calculate this integral with Maple?
http://www.mapleprimes.com/questions/220095-How-To-Calculate-This-Integral-With-Maple?ref=Feed:MaplePrimes:Tagged With symbolic
<p>Let us consider the improper integral</p>
<pre class="prettyprint">
int((abs(sin(2*x))-abs(sin(x)))/x, x = 0 .. infinity);
Si(Pi)-Si((1/2)*Pi)+sum(-(-1)^_k*Si(Pi*_k)+signum(sin((1/2)*Pi*_k))*Si((1/2)*Pi*_k)+Si(Pi*_k+Pi)*(-1)^_k-signum(cos((1/2)*Pi*_k))*Si((1/2)*Pi*_k+(1/2)*Pi), _k = 1 .. infinity)
</pre>
<p>Mathematica 11 produces a similar expression and a warning</p>
<p>Integrate::isub: Warning: infinite subdivision of the integration domain has been used in computation of the definite integral \!\(\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(\[Infinity]\)]\(\*FractionBox[\(\(-Abs[Sin[x]]\) + Abs[Sin[2\ x]]\), \(x\)] \[DifferentialD]x\)\). If the integral is not absolutely convergent, the result may be incorrect.</p>
<p>Up to Pedro Tamaroff <a href="http://math.stackexchange.com/questions/61828/proof-of-frullanis-theorem">http://math.stackexchange.com/questions/61828/proof-of-frullanis-theorem</a> , the answer is 2/Pi*ln(2) because of </p>
<pre class="prettyprint">
J := int(abs(sin(2*x))-abs(sin(x)), x = 0 .. T) assuming T>2;
-1/2-signum(sin(T))*signum(cos(T))*cos(T)^2+(1/2)*signum(sin(T))*signum(cos(T))+cos(T)*signum(sin(T))+floor(2*T/Pi)
B := limit(J/T, T = infinity);
2 /Pi
K := x*(int((abs(sin(2*t))-abs(sin(t)))/t^2, t = x .. 1)) assuming x>0,x<1;
2*sin(x)*cos(x)-2*Ci(2*x)*x+Ci(x)*x+sin(1)*x-sin(2)*x+2*Ci(2)*x-Ci(1)*x-sin(x)
A := limit(K, x = 0, right);
0
</pre>
<p>Its numeric calculation results </p>
<pre class="prettyprint">
evalf(Int((abs(sin(2*x))-abs(sin(x)))/x, x = 0 .. infinity));
Float(undefined)
</pre>
<p>which seems not to be true.</p>
<p>The question is: how to obtain the reliable results for it with Maple, both symbolic and numeric? </p>
<p>Let us consider the improper integral</p>
<pre class="prettyprint">
int((abs(sin(2*x))-abs(sin(x)))/x, x = 0 .. infinity);
Si(Pi)-Si((1/2)*Pi)+sum(-(-1)^_k*Si(Pi*_k)+signum(sin((1/2)*Pi*_k))*Si((1/2)*Pi*_k)+Si(Pi*_k+Pi)*(-1)^_k-signum(cos((1/2)*Pi*_k))*Si((1/2)*Pi*_k+(1/2)*Pi), _k = 1 .. infinity)
</pre>
<p>Mathematica 11 produces a similar expression and a warning</p>
<p>Integrate::isub: Warning: infinite subdivision of the integration domain has been used in computation of the definite integral \!\(\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(\[Infinity]\)]\(\*FractionBox[\(\(-Abs[Sin[x]]\) + Abs[Sin[2\ x]]\), \(x\)] \[DifferentialD]x\)\). If the integral is not absolutely convergent, the result may be incorrect.</p>
<p>Up to Pedro Tamaroff <a href="http://math.stackexchange.com/questions/61828/proof-of-frullanis-theorem">http://math.stackexchange.com/questions/61828/proof-of-frullanis-theorem</a> , the answer is 2/Pi*ln(2) because of </p>
<pre class="prettyprint">
J := int(abs(sin(2*x))-abs(sin(x)), x = 0 .. T) assuming T>2;
-1/2-signum(sin(T))*signum(cos(T))*cos(T)^2+(1/2)*signum(sin(T))*signum(cos(T))+cos(T)*signum(sin(T))+floor(2*T/Pi)
B := limit(J/T, T = infinity);
2 /Pi
K := x*(int((abs(sin(2*t))-abs(sin(t)))/t^2, t = x .. 1)) assuming x>0,x<1;
2*sin(x)*cos(x)-2*Ci(2*x)*x+Ci(x)*x+sin(1)*x-sin(2)*x+2*Ci(2)*x-Ci(1)*x-sin(x)
A := limit(K, x = 0, right);
0
</pre>
<p>Its numeric calculation results </p>
<pre class="prettyprint">
evalf(Int((abs(sin(2*x))-abs(sin(x)))/x, x = 0 .. infinity));
Float(undefined)
</pre>
<p>which seems not to be true.</p>
<p>The question is: how to obtain the reliable results for it with Maple, both symbolic and numeric? </p>
220095Tue, 22 Nov 2016 17:25:05 ZMarkiyan HirnykMarkiyan HirnykSolve symbolic integral function with various parameters
http://www.mapleprimes.com/questions/218622-Solve-Symbolic-Integral-Function-With?ref=Feed:MaplePrimes:Tagged With symbolic
<p>I can not find a solution to the integral of the function below the maple, can anyone help me?</p>
<p> </p>
<p>restart;<br>with(Student[MultivariateCalculus]);<br>with(Student[Calculus1]);</p>
<p>assume(-1 < rho and rho < 1, alpha1 > 0, beta1 > 0, alpha2 > 0, beta2 > 0, t1 > 0, t2 > 0)</p>
<p>f := proc (t1, t2, alpha1, beta1, alpha2, beta2, rho) options operator, arrow; (1/4)*(sqrt(beta1/t1)+(beta1/t1)^(3/2))*(sqrt(beta2/t2)+(beta2/t2)^(3/2))*exp(-((sqrt(t1/beta1)-sqrt(beta1/t1))^2/alpha1^2+(sqrt(t2/beta2)-sqrt(beta2/t2))^2/alpha2^2-2*rho*(sqrt(t1/beta1)-sqrt(beta1/t1))*(sqrt(t2/beta2)-sqrt(beta2/t2))/(alpha1*alpha2))/(2-2*rho^2))/(alpha1*beta1*alpha2*beta2*Pi*sqrt(1-rho^2)) end proc</p>
<p>int(int(f(t1, t2, alpha1, beta1, alpha2, beta2, rho), t2 = 1 .. infinity), t1 = 0.1e-2 .. y)</p>
<p> </p><p>I can not find a solution to the integral of the function below the maple, can anyone help me?</p>
<p> </p>
<p>restart;<br>with(Student[MultivariateCalculus]);<br>with(Student[Calculus1]);</p>
<p>assume(-1 < rho and rho < 1, alpha1 > 0, beta1 > 0, alpha2 > 0, beta2 > 0, t1 > 0, t2 > 0)</p>
<p>f := proc (t1, t2, alpha1, beta1, alpha2, beta2, rho) options operator, arrow; (1/4)*(sqrt(beta1/t1)+(beta1/t1)^(3/2))*(sqrt(beta2/t2)+(beta2/t2)^(3/2))*exp(-((sqrt(t1/beta1)-sqrt(beta1/t1))^2/alpha1^2+(sqrt(t2/beta2)-sqrt(beta2/t2))^2/alpha2^2-2*rho*(sqrt(t1/beta1)-sqrt(beta1/t1))*(sqrt(t2/beta2)-sqrt(beta2/t2))/(alpha1*alpha2))/(2-2*rho^2))/(alpha1*beta1*alpha2*beta2*Pi*sqrt(1-rho^2)) end proc</p>
<p>int(int(f(t1, t2, alpha1, beta1, alpha2, beta2, rho), t2 = 1 .. infinity), t1 = 0.1e-2 .. y)</p>
<p> </p>218622Tue, 04 Oct 2016 19:51:35 ZfsbmatfsbmatSolve matrices symbolically
http://www.mapleprimes.com/questions/215645-Solve-Matrices-Symbolically?ref=Feed:MaplePrimes:Tagged With symbolic
<p>Hello </p>
<p>Is there a way to solve matrices symbolically?</p>
<p>an example would be A*X=B</p>
<p>where the answer would be </p>
<p>X=A^-1B</p>
<p> </p>
<p>I have tried to look for a thing in maple that will do this but so far i had no luck. Does anyone know ?</p>
<p>Thanks in advance</p><p>Hello </p>
<p>Is there a way to solve matrices symbolically?</p>
<p>an example would be A*X=B</p>
<p>where the answer would be </p>
<p>X=A^-1B</p>
<p> </p>
<p>I have tried to look for a thing in maple that will do this but so far i had no luck. Does anyone know ?</p>
<p>Thanks in advance</p>215645Sat, 06 Aug 2016 10:00:59 ZEntvexEntvex