Items tagged with symbolic

Hallo,

im currently using Mathcad 15 and i want to change to a newer and better software with more possibilities.

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.

Now my question: Is it possible with Maple to write symbolic formulas (2D Structure of big formulas)

I dont write a formula in one row. Its nearly impossible ...

And can i calculate with units?

Thx Stefan

 

I meet a interesting nonlinear system in the analysis of an mechanics problem. This system can be shown as following:

wherein, the X and Y is the solutions. A, B, S, and T is the symbolic parameters.

I want to express X and Y with A, B, S, T. Who can give me a help, thanks a lot!

PS:the mw file is given here.

A_symbolic_nonlinear_system.mw

Let us consider the improper integral

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)
                    

Mathematica 11 produces a similar expression and a warning

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.

Up to Pedro Tamaroff http://math.stackexchange.com/questions/61828/proof-of-frullanis-theorem , the answer is 2/Pi*ln(2) because of 

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

Its numeric calculation results 

evalf(Int((abs(sin(2*x))-abs(sin(x)))/x, x = 0 .. infinity));
                        Float(undefined)

which seems not to be true.

The question is: how to obtain the reliable results for it with Maple, both symbolic and numeric? 

I can not find a solution to the integral of the function below the maple, can anyone help me?

 

restart;
with(Student[MultivariateCalculus]);
with(Student[Calculus1]);

assume(-1 < rho and rho < 1, alpha1 > 0, beta1 > 0, alpha2 > 0, beta2 > 0, t1 > 0, t2 > 0)

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

int(int(f(t1, t2, alpha1, beta1, alpha2, beta2, rho), t2 = 1 .. infinity), t1 = 0.1e-2 .. y)

 

Hello 

Is there a way to solve matrices symbolically?

an example would be A*X=B

where the answer would be 

X=A^-1B

 

I have tried to look for a thing in maple that will do this but so far i had no luck. Does anyone know ?

Thanks in advance

Hi,

I have encountered some strange issue with symbolic summation. Would be grateful for any help.

Here is the code (inserted as image):

Symbolic summation of powers of sines & cosines

 

Code in text:

restart;
F:=(n,a,b)->sum(r^(a+b)*cos(2*Pi/n*j+t)^a*sin(2*Pi/n*j+t)^b,j=0..n-1);

F(n,2,2);
F(4,2,2); 

The issue is that symbolic summation produces the formula (for general n) which contradicts the particular case (n=4).

Could somebody explain why this is happening? Is it a bug or am I missing something here?

I have tried all versions of Maple downto 14 - same situation.
Also Mathematica givers the same answer.

Thank you in advance,
Pavel Holoborodko.

--
Multiprecision Computing Toolbox
http://www.advanpix.com/

I'm running into a very simple problem with the way that Maple integrates Heaviside functions. Naively, it should act like a step function, but it is not integrating properly. See the attached document.

int(int(Heaviside(-x^2-y^2+1), x = -1 .. 1), y = -1 .. 1)

0

(1)

evalf(Int(Heaviside(-x^2-y^2+1), [x = -1 .. 1, y = -1 .. 1]))

3.141592654

(2)

int(piecewise(-x^2-y^2+1 > 0, 1, 0), [x = -1 .. 1, y = -1 .. 1])

Pi

(3)

``


Note that the symbolic integration of the Heaviside function (defined to be 1 inside the unit circle and 0 outside) gives zero, whereas it should clearly give the area of the unit circle, which the numerical integration does. I even checked that the (suposedly equivalent) piecewise definition symbolically evaluates to the area, and it, too, gets the right answer.

Anyone have any clue as to why the symbolic integration of this Heaviside function is so wrong? My understanding is that if we do the integral as two nested 1D integrals, the returned function (as a function of y) is zero everywhere except at y=0, but that result cannot be right either.

Thoughts?

 

Download Heaviside-error.mw

Hello,

I would like to determine a closed form solution (=analytical solution) of the following trigonometric equations system.

TrigonometricSystem2.mw

The unknowns are :

ListAllUnknowns := [Psi(t), Theta[1](t), Theta[2](t), x[1](t), x[2](t), z[1](t), z[2](t)]

Do you have ideas so as to conduct the symbolic resolution of this trigonometric equations system ?

I have been told that the use of Grobner basis could be useful but I have never try this.

Thanks a lot for yours feedbacks.

Hello everyone,
I would like to get a symbolic result of each variable x,y and z for the following 3 nonlinear equations. Maple does not respond to the following code at all. (Not even an error report.)

restart;

eq1 := x^2+y^2+z^2-134*x+800*y-360*z+31489, 2;
eq2 := x^2+y^2+z^2-934*x+900*y-370*z+321789, 2;
eq3 := x^2+y^2+z^2-614*x+1350*y-1110*z+70048, 97;
solve({eq1, eq2, eq3}, {x, y, z});

Thanks in advance.

P.S: Afterwards my intention is to solve these equaitons numerically for different variable values, and transfer to MatLab in order to plot animations and graphs. 

Hello guys,

I was just playing around with differential equations, when I noticed that symbolic solution is  different from the numerical.What is the reason for this strange behavior?


ODE := (diff(y(x), x))*(ln(y(x))+x) = 1

sol := dsolve({ODE, y(1) = 1}, y(x))

a := plot(op(2, sol), x = .75 .. 2, color = "Red");
sol2 := dsolve([ODE, y(1) = 1], numeric, range = .75 .. 2);

with(plots);
b := odeplot(sol2, .75 .. 2, thickness = 4);
display({a, b});

 

 

Strange_issue.mw

Mariusz Iwaniuk

Hi,

I have been trying to solve the following equation with respect to y, but I have not been successful. In fact, I always get answer RootOf(...). I should mention that all variables and parameters are real non-negative. I have also tested with "assume", but it did not help. Any suggestion would be appreciated. 

with(RealDomain):

eq := -((y-b)*mu-y)*x^beta*alpha+y^beta*varepsilon*(x-a) = 0

-((y-b)*mu-y)*x^beta*alpha+y^beta*varepsilon*(x-a) = 0

(1)

solve(eq, y)

RootOf(-x^beta*alpha*b*mu+x^beta*alpha*mu*_Z-x^beta*alpha*_Z+_Z^beta*varepsilon*a-_Z^beta*varepsilon*x)

(2)

remove_RootOf(%)

-x^beta*alpha*b*mu = 0

(3)

``

``

Download Equation.mw

 

Thanks.

Hello,

I would like to symbolically determine the rank of a jacobian matrix. In the help, I have seen that the Rank function of the LinearAlgebra can be used for this purpose. However, when I use this function, the function doesn't allow to find the different singularities that can occur on my jacobian matrix.

Here a exemple of a jacobian matrix that I obtain on a slidercrank mechanism:

Phi := Matrix(2, 3, {(1, 1) = -l1*sin(theta(t)), (1, 2) = -1, (1, 3) = l2*cos(beta(t)), (2, 1) = l1*cos(theta(t)), (2, 2) = 0, (2, 3) = l2*sin(beta(t))})

The rank of this jaobian (Phi) gives 2 whatever the values of theta(t) and beta(t). However, if the values of  theta(t) and beta(t) are :theta(t)=Pi/2,beta(t)=0. The rank shouldn't be 2 but 1.

Is a way to obtain the symbolic calculation of the rank of a jacobian matrix which can distinguish different cases following the values of the parameters ? In others words, my dream will be to have a Rank function (or another algorithm) which can gives :
the rank is 2 if theta(t) different of Pi/2 [Pi] and beta(t)=0 [Pi] 
and otherwise 1 if ...
and perhaps 0 if ...

Thanks a lot for your help.

I let a piece of code with an example of calculation of the rank

RankMatrix.mw

Hi guys,
I want to import symbolic matrix from matlab to Maple, How I can do that ? 


I solve a linear system of equations which is rank deficient. Naturally, when Maple solves it symbolically, it chooses some of its variables to use them as a basis to express the solution. 

In a specific problem I'm solving, the basis chosen by Maple is -very- smart, showing a good exploitation of the problem structure. 

I'm curious as to what kind of factorization is used by default, or if there's a lot of by hand "black magic" involved, what are its general characteristics. 

 

Best regards

Claudio

Sorry for the uninformative title. I've never used Maple, but I'm willing to buy a student license and learn it. But before spending too much effort and money I need to know if it suits my needs.

Basically what I need to do is:

1) I have a positive definite symmetric matrix of size nxn, where n can range from 2 to inf. I don't know the elements, except the fact that the diagonal has ones everywhere. All I know is that the elements out of the diagonal are in the range [0,1)

2) I have to compute the lower triangular cholesky decomposition of this matrix, lets call it L.

3) I need to subtract from each element of L the mean of the elements in the respective column. Lets call this matrix L*

4) Then I need to evaluate another nxn matrix computed from the elements of L* following a simple pattern.

5) Finally I need to find the eigenvalues of this last matrix.

What I would ideally want is to get a symbolic representation of the n eigenvalues as symbolic functions of the (unknown) elements of the matrix at point 1.

I can drop the assumption of n being unknown, i.e. fix n=3 and get the 3 functions that, after replacing the right values, give me the eigenvalues, then fix n=4 and get 4 functions, etc.

Is this possible to do in maple?

Thank you

1 2 3 4 5 6 Page 1 of 6