<

John2020

220 Reputation

5 Badges

2 years, 177 days

MaplePrimes Activity


These are questions asked by John2020

Hi,

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

https://www.mapleprimes.com/questions/229770-How-To-Find-The-Coefficient-Of-X-X2and

but they do not work for my case.

My case is as follows:

restart;
F:=2*y*sin(beta*x)+6*z*cos(beta*x)+24*sin(beta*x)*cos(beta*x):

coeff(F,sin(beta*x));
                      2 y + 24 cos(beta x)
coeff(F,cos(beta*x));
                      6 z + 24 sin(beta x)

coeff(coeff(F,cos(beta*x)),sin(beta*x));
                      24
The last one is true but for the first two cases, I want to get 2y and 6z respectively.

Hi,

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

When we use the code

convert(U(xi)^2*y(xi)^5,list);

we get 

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

but when we use

convert(U(xi)^2,list);

we obtain

[U(xi),2]

while I expect the following result:

[U(xi)^2]

* "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.

Hello,

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:
coeff(eq,(sinh(xi)^6)*(cosh(xi)^2));

frontend(coeff,[eq,(sinh(xi)^6)*(cosh(xi)^2)]);

please help me to solve it.

Thanks in advance.

Hi.

1- I want to solve the following equation:
eq:=diff(theta(t),t)=-(A[1]*Dirac(t-T[1])+A[2]*Dirac(t-T[2]));

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:

restart;
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.

 

Hello,

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)]);

Thanks.

1 2 3 4 Page 1 of 4