220 Reputation

5 Badges

4 years, 47 days

MaplePrimes Activity

These are questions asked by John2020


I want to get the coefficient of some terms but I can't define suitable codes to do it:

I used the codes of one question on this site namely

but they do not work for my case.

My case is as follows:


                      2 y + 24 cos(beta x)
                      6 z + 24 sin(beta x)

The last one is true but for the first two cases, I want to get 2y and 6z respectively.


I found a bug in convert, please help me if you know a solution.

When we use the code


we get 

[U(xi)^2, y(xi)^5]

but when we use


we obtain


while I expect the following result:


* "convert" is one part of my code for solving a problem. Sometimes there are cases that just exist one function instead of >1.

Since I want to keep my codes general, hence I need [U(xi)^2] in response to convert(U(xi)^2,list).

Thanks in advance.


I have a term:

eq:=2*cosh(xi)^8*alpha*B[2]^2 + 4*A[2]*sinh(xi)^6*cosh(xi)^2 + 4*A[1]*sinh(xi)^5*cosh(xi)^3 + 4*sinh(xi)^4*cosh(xi)^4*A[0];

I want to extract the coefficient of for example "sinh(xi)^6*cosh(xi)^2" but the following codes failed:


please help me to solve it.

Thanks in advance.


1- I want to solve the following equation:

with the boundary conditions:

bcon := theta(0)=-v[1],theta(1)=v[3]:

but the code

dsolve({eq,bcon},theta(t)) assuming T[1]<T[2];
and also

dsolve({eq,bcon},theta(t), method=laplace) assuming T[1]<T[2];

do not work. 

The solution must be:

theta(t)=piecewise(0 <= t and t < T[1], -v[1], T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]);

2-Furthemore, solving the ode:

eq2 := diff(phi(t),t)=piecewise(0 <= t and t < T[1], -v[1], T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]);

with the similar bc:

bcon2 := phi(0)=-v[2],phi(1)=v[4];

is another problem which I am trying to solve it. but again the code

dsolve({eq2,bcon2},phi(t)) assuming T[1]<T[2];

does not work!! while the solution must be:

phi(t)=piecewise(0 <= t and t < T[1], v[1]*(t-T[1]), T[1] < t and t < T[2], 0, T[2] < t and t <= 1, v[3]*(t-T[2]));

Could you please help me to solve these two problems??

I really appreciate any help you can provide.



How do we make the maple to produce as general solutions as possible for ode/pde ??

For example, I have the following ODE with initial conditions (cons);

eq:=diff(x[0](tau), tau) + x[0](tau) - diff(y[0](tau), tau) - y[0](tau)=0;

cons:= x[0](0)=1 , y[0](0)=1;

The general solution for this ode is as

x[0](tau) = y[0](tau) = exp( - tau ), 

but maple returns nothing.

when I use:

dsolve({cons, eq}, [v[0](tau), theta[0](tau)]);


1 2 3 4 Page 1 of 4