MaplePrimes Questions

Based on the equation at here https://www.mapleprimes.com/questions/209660-Problem-With-RealDomainsolve

I tried solve the equation (x-1)*sqrt(x^2 - 4)=0 in Real domain. My code
restart;
RealDomain:-solve((x-1)*sqrt(x^2-4) = 0, x);


I got there solutions are 1, 2, -2.  I think, If we solve the given in RealDomain, we only get two solutions -2 and 2.

My question is: How many solutions are there in the equation (x-1)*sqrt(x^2 - 4)=0 by RealDomain:-solve?

Two pictures by using Mathematica.

Hi,
I would like to trace periodic functions. I saw that this was possible with the old 'FourierSeries' package with the "Rept" command. How to reproduce the same thing in the Maple 19 environment? Thank you

fs_examples.mw

I am trying to get the exponential Fourier series versiion  with C_n seperate and it appears this package https://www.maplesoft.com/applications/view.aspx?SID=4857&view=html seems to do this

While I'm not particular to this package https://www.maplesoft.com/applications/view.aspx?SID=4857&view=html I cannot get it to work. It could be that FourierSeries is not built into maple in which case only the worksheet appears to be availble on the link above with no application in which case it should be removed.

If not an alternative would do. For example I got this https://www.maplesoft.com/applications/view.aspx?SID=33406 to work but I cannot get it in  format like Khanshan's package see example output (1.7).

1. y''(x)+10y(x)=99sin(x), y(0)=1, y'(0)=11 in the interval [0,100]

the exact solution is y(x)=cos(10x)+sin(10x)+sin(x)

 

2. y'=z, y(0)=1

    z'=-y(x)+x, z(0)=2

    the exact solutions are y(x)=cos(x)+sin(x)+x, z(x)=cos(x)-sin(10x)+1

 

Hello all, 

I know this question is a little bit of stretch but is there any way to shuffle terms in an equation set, making those equations written in a standard form?

For example, here are three equations:

eq1:=(L1/n12 + n12*L2)*diff(i2(t), t) + L1*diff(i3(t), t)/n13 = -v1(t) - R1*i3(t)/n13 - R1*i2(t)/n12 + n12*v2(t) - n12*R2*i2(t);

eq2:=L1*diff(i2(t), t)/n12 + (L1/n13 + n13*L3)*diff(i3(t), t) = -v1(t) - R1*i3(t)/n13 - R1*i2(t)/n12 + n13*v3(t) - n13*R3*i3(t);

eq3:=-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12 = -v2(t) + R2*i2(t) + v1(t)/n12 - R1*i1(t)/n12;

In this equation set, it can be inferred that 'i1(t)', 'i2(t)' and 'i3(t)' would be the state variables and 'v1(t)', 'v2(t)' and 'v3(t)' are external input variables. 

Then, probably the set can be rewritten in the state space equation form, i.e., diff(X) = A*X + B*U, where X is the state variables vector and U is a vector of external input variables. 

Is there any chance to make Maple to rewrite the equations in this way?

Thank you in advance. 

 

fyi, there seems to be a problem here. Maple 2019, Physics version 395 on windows 10.

The solution given to this wave PDE by Maple as sum that starts from zero, has "n" in the denominator. When n=0, this gives division by zero.  Is this a bug?

restart;
L:=3: c:=4: h:=1/10: b:=Pi*c/L:
f:=piecewise(0<=x and x<=L/3,3*h/L*x,L/3<x and x<=L,h):
pde := diff(u(x,t),t$2) + b*diff(u(x,t),t) = c^2*diff(u(x,t),x$2):
bc  := u(0,t)=0,D[1](u)(L,t)=0:
ic  := D[2](u)(x,0)=0,u(x,0)=f:
sol:=pdsolve([pde,bc,ic],u(x,t));
subs(n=0,sol)

u(x, t) = Sum(-((3/10)*I)*sin((1/6)*(1+2*n)*Pi*x)*(3^(1/2)*sin((1/3)*Pi*n)+cos((1/3)*Pi*n))*((2*I)*exp((4/3)*t*(I*n^(1/2)*(n+1)^(1/2)-1/2)*Pi)*n^(1/2)*(n+1)^(1/2)+(2*I)*exp(-(4/3)*(I*n^(1/2)*(n+1)^(1/2)+1/2)*t*Pi)*n^(1/2)*(n+1)^(1/2)+exp((4/3)*t*(I*n^(1/2)*(n+1)^(1/2)-1/2)*Pi)-exp(-(4/3)*(I*n^(1/2)*(n+1)^(1/2)+1/2)*t*Pi))/(n^(1/2)*(n+1)^(1/2)*Pi^2*(1+2*n)^2), n = 0 .. infinity)

Error, numeric exception: division by zero

 


 

Download bug_july_11_2019.mw

 

 

Let m, n be two monomials with parametric coefficients. How to decide that two monomials are distinct in the variables?

For example, if m= (a-1)x^2y and b= (a-b)z^2 (where a,b are parameters and x,y,z are variables) then m and n are distinct. Is there any command? 

Thank you in advance.

 

Hello,

I need help to approximate Fn(x,y) and Sn(y) for n>=3 to see the convergence. 

Here is the problem:

I have an integral equation Fn(x, y) defined by

F0(x,y) = 0,

F1(x,y) = (9/8)*(y+1) - (21/8)*( y*exp(-2*x) + exp(-x) )

Fn+1(x,y) = (9/8)*(y+1) - (21/8)*( y*exp(-2*x) + exp(-x) ) + (3/4)*int ( Fn( x-z, 2*y*exp(-z) ), z=0..Un(x) ), where the function Un(x) is defined below.

where I suppose that Fn(x,y) >=0 and y>=0 and x>=0. I am iterating the integral equation and find the zeros Sn(y) solutions of Fn(S(y) , y) = 0. The goal is to show that the sequence Fn(x,y) converges to some F(x,y) and Sn(y) converges to some S(y). We can also plot the curves Sn(y) to show the convergence. Notice that Sn(y) >= 0 is increasing in n and decreasing in y.

What I did :

If n = 0, I solve F1(x,y) = 0 and find analytically x = S1(y) = -ln((1/14)*(-7+sqrt(84*y^2+84*y+49))/y). Notice that F1(x,y) = 0 is quadratic in exp(-x) and then F1(x,y) = 0 is easy to solve. S1(y) is the positive function for y>=0.

If n = 1, we need to solve F2(x,y) = (9/8)*(y+1) -(21/8)*( y*exp(-2*x) + exp(-x) ) + (3/4)*int ( F1( x-z, 2*y*exp(-z) ), z, 0, U1(x) ). The function U1(x) is obtained as follows :

i) We define g( U ) = U + S1( 2*y*exp(-U) )

ii) We find the function U1(x,y) solution of g( U1(x,y) ) = x

 

A generalization of Un(x) is given by

i) Define g( U ) = U + Sn( 2*y*exp(-U) )

ii) Find the function Un(x,y) solution of g( Un(x,y) ) = x

The curve S2(y) :

I find the analytic function F2(x, y), but it is impossible to solve F2(x,y) = 0 and find x = S2(y) analytically. So I choose an interval [0, 10] for y and discretize that interval. Now at each point yi in [0, 10], the function F2(x, yi) depends only on x. I apply the bisection method (dichotomic method) and find the value xi such that F2(xi, yi) = 0. The data (yi, xi) gives the curve S2(y). I plot the data (yi, xi) and (y, S1(y)) in the same curve.

Question:

It is impossible to iterate the process below and find F3(x, y), F4(x,y), etc... because we cannot find U2(x), U3(x), etc... analytically. Any suggestions or helps to plot the curves (y, Sn(y)) for n = 3, 4, etc. to see the convergence ?

Thanks !

 I'm confused as to why Maple can't perform a certain integral for me. Please see my attached code - it get's stuck on the last step.

 

070919_ThetaIntegral.mw

        I  want save a set as shown below:
       
 E:={{1,2,3,4,5,6},{4,5,6,7,8,9,10,11},{10,11,12,13,14}};
E := {{10, 11, 12, 13, 14}, {1, 2, 3, 4, 5, 6}, {4, 5, 6, 7, 8, 9, 10, 11}}
     
    The order of set is changed; I have known the list can do it following my order,
       E:=[{1,2,3,4,5,6},{4,5,6,7,8,9,10,11},{10,11,12,13,14}];
but I want to know what can I do in set?

Does anyone know how collect zero epsilon coefficient from follow expression?

coeff_test.mw

Is it possible?

Thank you!

How I can calculate integral?

Thanks


 

"restart;    f[1,1](r,theta,phi):=r^4 sin(6 theta) sin(3 phi):    L(r, theta,phi):=(2.784615385 10^10 ((&PartialD;)^2)/(&PartialD;r^2) `f__11`(r,theta,phi)+(2.784615385 10^10 (2+2 r cos(theta)) ((&PartialD;)/(&PartialD;r) `f__11`(r,theta,phi)))/(r (2+r cos(theta)))-(0.1175000000 (((&PartialD;)^4)/(&PartialD;theta^4) `f__11`(r,theta,phi)))/(r^4)-(0.1175000000 (((&PartialD;)^4)/(&PartialD;phi^4) `f__11`(r,theta,phi)))/((2+r cos(theta))^4)-(0.1175000000 (((&PartialD;)^4)/(&PartialD;phi^2&PartialD;r^2) `f__11`(r,theta,phi)))/((2+r cos(theta))^2)-(0.1175000000 (((&PartialD;)^4)/(&PartialD;r^2&PartialD;theta^2) `f__11`(r,theta,phi)))/(r^2)-(0.2350000000 (((&PartialD;)^4)/(&PartialD;phi^2&PartialD;theta^2) `f__11`(r,theta,phi)))/(r^2 (2+r cos(theta))^2)+(0.1175000000 ((cos(theta))^2 r^2+4 (cos(theta))^2 r^4+16 cos(theta) r^3-4+17 r^2) (((&PartialD;)^2)/(&PartialD;theta^2) `f__11`(r,theta,phi)))/((2+r cos(theta))^2 r^4)+(0.1175000000 (2 (cos(theta))^2 r^2+4 (cos(theta))^2 r^4+16 cos(theta) r^3+4+12 r^2) (((&PartialD;)^2)/(&PartialD;phi^2) `f__11`(r,theta,phi)))/(r^2 (2+r cos(theta))^4)-(2.784615385 10^10 (2 (cos(theta))^2 r^2+4 r cos(theta)+4) `f__11`(r,theta,phi))/(r^2 (2+r cos(theta))^2)+(0.2350000000 (((&PartialD;)^3)/(&PartialD;r&PartialD;theta^2) `f__11`(r,theta,phi)))/(r^3 (2+r cos(theta)))-(0.2350000000 (((&PartialD;)^3)/(&PartialD;phi^2&PartialD;r) `f__11`(r,theta,phi)))/(r (2+r cos(theta))^3)+(0.2350000000 sin(theta) (((&PartialD;)^3)/(&PartialD;theta^3) `f__11`(r,theta,phi)))/(r^3 (2+r cos(theta)))-(0.2350000000 sin(theta) (((&PartialD;)^3)/(&PartialD;phi^2&PartialD;theta) `f__11`(r,theta,phi)))/(r (2+r cos(theta))^3)+(0.1175000000 sin(theta) (((&PartialD;)^3)/(&PartialD;r^2&PartialD;theta) `f__11`(r,theta,phi)))/(r (2+r cos(theta)))-(0.1175000000 (2 r cos(theta)+3) sin(theta) (2 r cos(theta)+5) ((&PartialD;)/(&PartialD;theta) `f__11`(r,theta,phi)))/(r (2+r cos(theta))^3)) r^4 sin(6 theta) sin(3 phi):"

with(Student[Calculus1]); K[rr, s] := evalf(ApproximateInt(L(r, theta, phi), r = .2 .. 1, method = simpson)); KK[rr, s] := evalf(ApproximateInt(K[rr, s], theta = 0 .. 2*Pi, method = simpson)); k2 := evalf(ApproximateInt(KK[rr, s], phi = 0 .. 2*Pi, method = simpson))

``


 

Download

Hello,

Real beginner, never used Maplw before. I want to analyse PDE's through Lie symmetry analysis -- get the infiniteeimals and then generate the invariants. I am going through the standard examples on the help within Maple, but I am stuck on a basic issue which prompts me to think that there may be something different in my version of Maple (although I downloaded it from TTU which I presume should be the latest version).

Here's what I get >>>>>

Loading PDEtools

with(PDEtools, InfinitesimalGenerator, declare);
               [InfinitesimalGenerator, declare]

declare(u(x, t));
               u(x, t) will now be displayed as u
U: diff_table(u(x, t)):
PDE := U_x,x - U_t = 0;
                    PDE := U_x,x - U_t = 0
show;
                       U_x,x - U_t = 0
Infinitesimals(PDE)
Error, (in PDEtools:-Infinitesimals) missing dependent variables

>>>>>

 

I have also tried:

Infinitesimals(PDE, u)
Error, (in PDEtools:-Infinitesimals) not a PDE system w.r.t u

and:

Infinitesimals(PDE, U)
Error, (in PDEtools:-Infinitesimals) not a PDE system w.r.t U
 

There are many other issues, but let's deal with this one first.

 

Thanks

Best wishes

Nadeem

 

 

 

Hello all, 

Would you teach me how to cancel a denominator term by multiplying the same term?

For example, I got this expression:

-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12

Then, I want to come to this expression by multiplying the expression with 'n12'

-L2*n12*diff(i2(t), t) + L1*diff(i1(t), t), 

But the result from my simple attempt was this:

(-L2*diff(i2(t), t) + L1*diff(i1(t), t)/n12)*n12

Thank you in advance!

 

Hey there, I have a pretty general question.

I'm trying to fill out the entries of a matrix. Each matrix element is the result of a very complicated calculation. Currently, I am using nested do loops (two loops total) to scan through each row and column respectively. I find that this process racks up a ton of memory, and that I in fact run out of memory before the matrix has been completely specified.

First, why is this happening? And second, what is a smarter way to perform the calculation?

 

Cheers.

First 665 666 667 668 669 670 671 Last Page 667 of 2425