Items tagged with differential

solution of system of differential equations

is {a(t) = 1, b(t) = exp(t), c(t) = 0}

1 = exp(t), since t = 0, is characteristic equation = (y-0)?
0 = exp(t), how to find this characteristic equation when division is zero?
exp(t) = exp(t), is characteristic equation = (y-t)?

Dear all

I have problem related to collection of coefficient of differtials in differential expression containing multiple dependent variables and we want to collect coefficient wrt to selected dependent variables. Please see attached Maple file for details.

 


with(PDEtools):

DepVars := [u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

[u(x, t), v(x, t), a[1](t), a[2](t), a[3](t), b[1](t), b[2](t), b[3](t), r(x, t), s[1](x, t), p[1](x, t), s[2](x, t), p[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), a[1] = a[1](t), a[2] = a[2](t), a[3] = a[3](t), b[1] = b[1](t), b[2] = b[2](t), b[3] = b[3](t), r = r(x, t), s[1] = s[1](x, t), p[1] = p[1](x, t), s[2] = s[2](x, t), p[2] = p[2](x, t))

u, v, a[1], a[2], a[3], b[1], b[2], b[3], r, s[1], p[1], s[2], p[2]

(2)

Suppose we differential expression like:

a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]+diff(p[1], t)+a[3]*(diff(p[1], x, x, x))+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]-3*(diff(r, x))*p[1]+(diff(a[1], t))*u*(diff(u, x))+(diff(a[2], t))*v*(diff(v, x))+a[2]*(diff(v, x))*p[2]+a[2]*v^2*(diff(s[2], x))+a[2]*v*(diff(p[2], x))+a[1]*u*(diff(p[1], x))+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))+3*a[3]*(diff(s[1], x))*(diff(u, x, x))+3*a[3]*(diff(s[1], x, x))*(diff(u, x))+a[3]*(diff(r, x, x, x))*(diff(u, x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+a[3]*(diff(s[1], x, x, x))*u+3*a[3]*(diff(r, x, x))*(diff(u, x, x)) = 0

3*a[3]*(diff(diff(r, x), x))*(diff(diff(u, x), x))+3*a[3]*(diff(s[1], x))*(diff(diff(u, x), x))+3*a[3]*(diff(diff(s[1], x), x))*(diff(u, x))+a[3]*(diff(diff(diff(r, x), x), x))*(diff(u, x))+a[3]*(diff(diff(diff(s[1], x), x), x))*u+diff(p[1], t)+(diff(r, t))*(diff(u, x))+(diff(s[1], t))*u-3*(diff(r, x))*p[1]+a[3]*(diff(diff(diff(p[1], x), x), x))-(diff(a[3], t))*a[1]*u*(diff(u, x))/a[3]-(diff(a[3], t))*a[2]*v*(diff(v, x))/a[3]+a[1]*(diff(u, x))*s[1]*u-2*a[1]*u*(diff(r, x))*(diff(u, x))+2*a[2]*(diff(v, x))*s[2]*v-2*a[2]*v*(diff(r, x))*(diff(v, x))-(diff(a[3], t))*r*(diff(u, x))/a[3]-(diff(a[3], t))*s[1]*u/a[3]-s[1]*a[2]*v*(diff(v, x))+(diff(a[1], t))*u*(diff(u, x))+a[1]*u*(diff(p[1], x))+a[2]*v*(diff(p[2], x))+a[2]*v^2*(diff(s[2], x))+a[2]*(diff(v, x))*p[2]+a[1]*(diff(u, x))*p[1]+a[1]*u^2*(diff(s[1], x))-(diff(a[3], t))*p[1]/a[3]-3*r*(diff(r, x))*(diff(u, x))-3*(diff(r, x))*s[1]*u+(diff(a[2], t))*v*(diff(v, x)) = 0

(3)

We can collect coefficients of differential like u[x], u[x, x], v[x], u, vin following manner:

The Procedure

   

 

 

Now how can we collect coefficents with respect to u[x], u[x, x], v[x], u, vso that differential expression (3) appear as
"(......)*u+(.......)*v+(......)*u[x]+(........)*uu[x]+(.........)vv[x]+(........)u[xx]  =0....................."????????""

``


Download Collecting_Coefficients_in_Differential_Expression.mw

Regards

Dear Friends

In differential expressions(See Maple file) how to find coefficiets of dependent variable "u(x,t)" and "v(x,t)" and of their differentials ? There is command "dcoeffs(function)", but that work for single dependent variable only but in our case there are two dependent variables in consideration. There are other options like "indets", "specindex" but those do not work.

 


with(PDEtools):

DepVars; -1; [u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

[u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), r[1] = r[1](t), r[2] = r[2](t), s[1] = s[1](t), s[2] = s[2](t), p[1] = p[1](t), p[2] = p[2](t), alpha[1] = alpha[1](x, t), beta[1] = beta[1](x, t), beta[2] = beta[2](x, t), delta[1] = delta[1](x, t), delta[2] = delta[2](x, t))

u, v, r[1], r[2], s[1], s[2], p[1], p[2], alpha[1], beta[1], beta[2], delta[1], delta[2]

(2)

(diff(r[1], t))*(-s[1]*u*(diff(u, x))-p[1]*((diff(u, x))*v+u*(diff(v, x)))-alpha[1]*(diff(u, x))-beta[1]*u-delta[1])/r[1]+r[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x, x))+(diff(s[1], t))*u*(diff(u, x))+s[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(u, x))+s[1]*u*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(p[1], t))*((diff(u, x))*v+u*(diff(v, x)))+p[1]*((diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))*v+(diff(u, x))*(alpha[1]*(diff(v, x))+beta[2]*v+delta[2])+(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(v, x))+u*(diff(alpha[1]*(diff(v, x))+beta[2]*v+delta[2], x)))+(diff(alpha[1], t))*(diff(u, x))+alpha[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(beta[1], t))*u+beta[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])+diff(delta[1], t)

(diff(r[1], t))*(-s[1]*u*(diff(u, x))-p[1]*((diff(u, x))*v+u*(diff(v, x)))-alpha[1]*(diff(u, x))-beta[1]*u-delta[1])/r[1]+r[1]*((diff(diff(alpha[1], x), x))*(diff(u, x))+2*(diff(alpha[1], x))*(diff(diff(u, x), x))+alpha[1]*(diff(diff(diff(u, x), x), x))+(diff(diff(beta[1], x), x))*u+2*(diff(beta[1], x))*(diff(u, x))+beta[1]*(diff(diff(u, x), x))+diff(diff(delta[1], x), x))+(diff(s[1], t))*u*(diff(u, x))+s[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(u, x))+s[1]*u*((diff(alpha[1], x))*(diff(u, x))+alpha[1]*(diff(diff(u, x), x))+(diff(beta[1], x))*u+beta[1]*(diff(u, x))+diff(delta[1], x))+(diff(p[1], t))*((diff(u, x))*v+u*(diff(v, x)))+p[1]*(((diff(alpha[1], x))*(diff(u, x))+alpha[1]*(diff(diff(u, x), x))+(diff(beta[1], x))*u+beta[1]*(diff(u, x))+diff(delta[1], x))*v+(diff(u, x))*(alpha[1]*(diff(v, x))+beta[2]*v+delta[2])+(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(v, x))+u*((diff(alpha[1], x))*(diff(v, x))+alpha[1]*(diff(diff(v, x), x))+(diff(beta[2], x))*v+beta[2]*(diff(v, x))+diff(delta[2], x)))+(diff(alpha[1], t))*(diff(u, x))+alpha[1]*((diff(alpha[1], x))*(diff(u, x))+alpha[1]*(diff(diff(u, x), x))+(diff(beta[1], x))*u+beta[1]*(diff(u, x))+diff(delta[1], x))+(diff(beta[1], t))*u+beta[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])+diff(delta[1], t)

(3)

In above differential expressions how to find coefficiets of dependent variable "u(x,t)" and "v(x,t)" and of their differentials ? There is command "dcoeffs(expr,u(x,t))", but that work for single dependent variable only but in our case there are two dependent variables in consideration. There are other options like "indets", "specindex" but those do not work.

``


Download Coefficients_in_differential_expression.mw

Hello everyone,

 

I am trying to extract the coefficients from a differential poynomial. In general, this poynomial is in two variables, say u and v along with their differentials, i.e D(u) or D@@2(u) or so on. 

Coefficients of this polynomials are rational funcitons.

For instance- consider the following example:

a(x)*v*u+v*D(u)-D(v)*u

then output should be [a(x), 1, -1].

 

Thanks for your help.

I want to solve these two differential equations. I have the initial conditions:
x(0)=0
y(0)=0
x'(0)=5.7
t'(0)=8.1
What am I doing wrong?


One of the interesting things about the Physics package is that it was designed from scratch to extend the domain of operations of the Maple system from commutative variables to one that includes commutative, anticommutative and nonocommutative variables, as well as abstract vectors and related (nabla) differential operators. In this line we have, among others, the following Physics commands working with this extended domain: `*` , `.` , `^` , diff , Expand , Normal , Simplify , Gtaylor , and Coefficients .

 

More recently, Pascal Szriftgiser (from Laboratoire PhLAM, Université Lille 1, France), suggested a similar approach to factorize expressions involving noncommutative variables. This is a pretty complicated problem though. Pascal's suggestion, however, spinned around an idea beautiful for its simplicity, similar to what is done in the experimental Physics command, PerformOnAnticommutativeSystem , that is, to transform the problem into one that can be treated with the command that works only with commutative variables and from there extract the result for noncommutative ones.The approach has limitations but it is surprising how far one can go using imaginative algebraic manipulations to extend these commands that otherwise only work with commutative variables.

 

In brief, we now have a new command, Physics:-Factor, with already powerful performance for factorizing algebraic expressions that involve commutative, noncommutative and anticommutative variables, making Maple's mathematical capabilities more advanced in very interesting directions. This command is in fact useful not just in advanced theoretical physics, but for instance also when working with noncommutative symbols representing abstract matrices (that can have dependency, and so they can be differentiated before saying anything about their components, multiplied, and be present int  expressions that in turn can be expanded, simplified and now also factorized), and also useful with expressions that include differential operators, now that within Physics you can compute with the the covariant and noncovariant derivatives D_  and d_ algebraically. For instance, how about solving differential equations using Physics:-Factor (reducing their order by means of factoring the involved differential operators) ? :)

 

What follows are some basic algebraic examples illustrating the novelty, and as usual to reproduce the results in this worksheet you need to update your Physics library with the one available in the Maplesoft R&D Physics webpage.

 

Physics:-Version()[2]

`2015, September 25, 7:48 hours`

(1)

with(Physics); -1; Setup(quantumoperators = {a, b, c, d, e}, mathematicalnotation = true)

[mathematicalnotation = true, quantumoperators = {a, b, c, d, e}]

(2)

First example, because of using mathematical notation, noncommutative variables are displayed in different color (olive)

Physics:-`*`(Physics:-`^`(alpha, 2), Physics:-`^`(a, 2))+Physics:-`*`(Physics:-`*`(Physics:-`*`(alpha, sqrt(2)), a), b)+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, sqrt(2)), lambda), Physics:-`^`(b, 2)), c)+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, lambda), alpha), b), c), a)+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, lambda), sqrt(2)), b), c), b)+Physics:-`*`(Physics:-`*`(16, Physics:-`^`(lambda, 2)), Physics:-`^`(Physics:-`*`(b, c), 2))+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, alpha), lambda), a), b), c)+Physics:-`*`(Physics:-`*`(Physics:-`*`(sqrt(2), alpha), b), a)+Physics:-`*`(2, Physics:-`^`(b, 2))

alpha^2*Physics:-`^`(a, 2)+alpha*2^(1/2)*Physics:-`*`(a, b)+4*2^(1/2)*lambda*Physics:-`*`(Physics:-`^`(b, 2), c)+4*lambda*alpha*Physics:-`*`(b, c, a)+4*2^(1/2)*lambda*Physics:-`*`(b, c, b)+16*lambda^2*Physics:-`^`(Physics:-`*`(b, c), 2)+4*lambda*alpha*Physics:-`*`(a, b, c)+alpha*2^(1/2)*Physics:-`*`(b, a)+2*Physics:-`^`(b, 2)

(3)

Physics:-Factor(alpha^2*Physics:-`^`(a, 2)+alpha*2^(1/2)*Physics:-`*`(a, b)+4*2^(1/2)*lambda*Physics:-`*`(Physics:-`^`(b, 2), c)+4*lambda*alpha*Physics:-`*`(b, c, a)+4*2^(1/2)*lambda*Physics:-`*`(b, c, b)+16*lambda^2*Physics:-`^`(Physics:-`*`(b, c), 2)+4*lambda*alpha*Physics:-`*`(a, b, c)+alpha*2^(1/2)*Physics:-`*`(b, a)+2*Physics:-`^`(b, 2))

Physics:-`^`(4*lambda*Physics:-`*`(b, c)+a*alpha+2^(1/2)*b, 2)

(4)

A more involved example from a physics problem, illustrating that the factorization is also happening within function's arguments, as well as that we can also correctly expand mathematical expressions involving noncommutative variables

PDEtools:-declare((a, b, c, g)(x, y)):

a(x, y)*`will now be displayed as`*a

 

b(x, y)*`will now be displayed as`*b

 

c(x, y)*`will now be displayed as`*c

 

g(x, y)*`will now be displayed as`*g

(5)

Physics:-Intc(Physics:-`^`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, Physics:-Dagger(b(x, y))), c(x, y)), lambda)+Physics:-`*`(Physics:-`*`(Physics:-`*`(alpha, f(t)), a(x, y)), Physics:-Dagger(a(x, y)))+Physics:-`*`(Physics:-`*`(sqrt(2), g(x, y)), b(x, y)), 2), x, y)

Int(Int(Physics:-`^`(4*lambda*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y))+alpha*f(t)*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)))+2^(1/2)*g(x, y)*b(x, y), 2), x = -infinity .. infinity), y = -infinity .. infinity)

(6)

So first expand ...

expand(Int(Int(Physics:-`^`(4*lambda*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y))+alpha*f(t)*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)))+2^(1/2)*g(x, y)*b(x, y), 2), x = -infinity .. infinity), y = -infinity .. infinity))

Int(Int(16*lambda^2*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), Physics:-Dagger(b(x, y)), c(x, y))+4*lambda*alpha*f(t)*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), a(x, y), Physics:-Dagger(a(x, y)))+4*lambda*2^(1/2)*g(x, y)*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), b(x, y))+4*alpha*f(t)*lambda*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), Physics:-Dagger(b(x, y)), c(x, y))+alpha^2*f(t)^2*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), a(x, y), Physics:-Dagger(a(x, y)))+alpha*f(t)*2^(1/2)*g(x, y)*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), b(x, y))+4*2^(1/2)*g(x, y)*lambda*Physics:-`*`(b(x, y), Physics:-Dagger(b(x, y)), c(x, y))+2^(1/2)*g(x, y)*alpha*f(t)*Physics:-`*`(b(x, y), a(x, y), Physics:-Dagger(a(x, y)))+2*g(x, y)^2*Physics:-`^`(b(x, y), 2), x = -infinity .. infinity), y = -infinity .. infinity)

(7)

Now retrieve the original expression by recursing over the arguments and so factoring the integrand

Physics:-Factor(Int(Int(16*lambda^2*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), Physics:-Dagger(b(x, y)), c(x, y))+4*lambda*alpha*f(t)*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), a(x, y), Physics:-Dagger(a(x, y)))+4*lambda*2^(1/2)*g(x, y)*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y), b(x, y))+4*alpha*f(t)*lambda*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), Physics:-Dagger(b(x, y)), c(x, y))+alpha^2*f(t)^2*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), a(x, y), Physics:-Dagger(a(x, y)))+alpha*f(t)*2^(1/2)*g(x, y)*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)), b(x, y))+4*2^(1/2)*g(x, y)*lambda*Physics:-`*`(b(x, y), Physics:-Dagger(b(x, y)), c(x, y))+2^(1/2)*g(x, y)*alpha*f(t)*Physics:-`*`(b(x, y), a(x, y), Physics:-Dagger(a(x, y)))+2*g(x, y)^2*Physics:-`^`(b(x, y), 2), x = -infinity .. infinity), y = -infinity .. infinity))

Int(Int(Physics:-`^`(4*lambda*Physics:-`*`(Physics:-Dagger(b(x, y)), c(x, y))+alpha*f(t)*Physics:-`*`(a(x, y), Physics:-Dagger(a(x, y)))+2^(1/2)*g(x, y)*b(x, y), 2), x = -infinity .. infinity), y = -infinity .. infinity)

(8)

This following one looks simpler but it is actually more complicated:

Physics:-`*`(Physics:-Commutator(a, b), c)

Physics:-`*`(Physics:-Commutator(a, b), c)

(9)

expand(Physics:-`*`(Physics:-Commutator(a, b), c))

Physics:-`*`(a, b, c)-Physics:-`*`(b, a, c)

(10)

The complication consists of the fact that the standard factor  command, that assumes products are commutative, can never deal with factors like Physics:-Commutator(a, b) = a*b-a*b because if products were commutative these factors are equal to 0. Of course we not just us factor but include a number of algebraic manipulations before using it, so that the approach handles these cases nicely anyway

Physics:-Factor(Physics:-`*`(a, b, c)-Physics:-`*`(b, a, c))

Physics:-`*`(Physics:-`*`(a, b)-Physics:-`*`(b, a), c)

(11)

This other one is more complicated:

Physics:-`*`(Physics:-`*`(a, b)-Physics:-`*`(b, a), a+Physics:-`*`(beta, b)+Physics:-`^`(c, 2))

Physics:-`*`(Physics:-`*`(a, b)-Physics:-`*`(b, a), a+beta*b+Physics:-`^`(c, 2))

(12)

When you expand,

expand(Physics:-`*`(Physics:-`*`(a, b)-Physics:-`*`(b, a), a+beta*b+Physics:-`^`(c, 2)))

Physics:-`*`(a, b, a)+beta*Physics:-`*`(a, Physics:-`^`(b, 2))+Physics:-`*`(a, b, Physics:-`^`(c, 2))-Physics:-`*`(b, Physics:-`^`(a, 2))-beta*Physics:-`*`(b, a, b)-Physics:-`*`(b, a, Physics:-`^`(c, 2))

(13)

you see that there are various terms involving the same noncommutative operands, just multiplied in different order. Generally speaking the limitation (n this moment) of the approach is: "there cannot be more than 2 terms in the expanded form containing the same operands" . For instance in (13) the 1st and 4th terms have the same operands, that are actually also present in the 5th term but there you also have beta and for that reason (involving some additional manipulations) it can be handled:

Physics:-Factor(Physics:-`*`(a, b, a)+beta*Physics:-`*`(a, Physics:-`^`(b, 2))+Physics:-`*`(a, b, Physics:-`^`(c, 2))-Physics:-`*`(b, Physics:-`^`(a, 2))-beta*Physics:-`*`(b, a, b)-Physics:-`*`(b, a, Physics:-`^`(c, 2)))

Physics:-`*`(Physics:-`*`(a, b)-Physics:-`*`(b, a), a+beta*b+Physics:-`^`(c, 2))

(14)

Recalling, in all these examples, the task is actually accomplished by the standard factor  command, and the manipulations consist of ingeniously rewriting the given problem as one that involves only commutative variables, and from extract the correct result for non commutative variables.

 

To conclude, here is an example where the approach implemented does not work (yet) because of the limitation mentioned in the previous paragraph:

Physics:-`^`(Physics:-Commutator(a, b)+c, 2)

Physics:-`^`(Physics:-Commutator(a, b)+c, 2)

(15)

expand(Physics:-`^`(Physics:-Commutator(a, b)+c, 2))

Physics:-`*`(a, b, a, b)-Physics:-`*`(a, Physics:-`^`(b, 2), a)+Physics:-`*`(a, b, c)-Physics:-`*`(b, Physics:-`^`(a, 2), b)+Physics:-`*`(b, a, b, a)-Physics:-`*`(b, a, c)+Physics:-`*`(c, a, b)-Physics:-`*`(c, b, a)+Physics:-`^`(c, 2)

(16)

In this expression, the 1st, 2nd, 4th and 5th terms have the same operands a, b, a, b and then there are four terms containing the operands a, b, c. We do have an idea of how this could be done too ... :) To be there in one of the next Physics updates.

NULL

NULL


Download Physics[Factor].mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi everyone,

I'm kinda new here, and I really hope you guys can help me through this.

I'm doing a term project and I need to solve this differential equation. I tried to make it work, but since I'm new with maple I couldn't get to any result. So I really appreciate if you can help me solve the problem, since I am eally stuck here and all other results sort of depend on this equation.

here is the equation:

diff(y(x), x, x) = -(8*omega*(1-exp(-8*x))*exp(-8*x)/(2*x^2)-pi^2/(32*x))*y(x)

with following boundary conditions:

y(0)=0,

y(1/2)=0 ,

y'(0)=1.

thanks again.


The PDE & BC project , a very nice and challenging one, also one where Maple is pioneer in all computer algebra systems, has restarted, including now also the collaboration of Katherina von Bülow.

Recapping, the PDE & BC project started 5 years ago implementing some of the basic methods found in textbooks to match arbitrary functions and constants to given PDE boundary conditions of different kinds. At this point we aim to fill gaps, and the first one we tackled is the case of 1st order PDE that can be solved without boundary conditions in terms of an arbitrary function, and where a single boundary condition (BC) is given for the PDE unknown function, and this BC does not depend on the independent variables of the problem. It looks simple ... It can be rather tricky though. The method we implemented is a simple however ingenious use of differential invariants  to match the boundary condition.


The resulting new code, the portion already tested, is available for download in the Maplesoft R&D webpage for Differential Equations and Mathematical Functions (the development itself is bundled within the library that contains the new developments for the Physics package, in turn within the zip linked in the webpage).


The examples that can now be handled, although restricted in generality to "only one 1st order linear or nonlinear PDE and only one boundary condition for the unknown function itself", illustrate well how powerful it can be to use more advanced methods to tackle these tricky situations where we need to match an arbitrary function to a boundary condition.


To illustrate the idea, consider first a linear example, among the simplest one could imagine:

PDEtools:-declare(f(x, y, z))

f(x, y, z)*`will now be displayed as`*f

(1)

pde := diff(f(x, y, z), x)+diff(f(x, y, z), y)+diff(f(x, y, z), z) = f(x, y, z)

diff(f(x, y, z), x)+diff(f(x, y, z), y)+diff(f(x, y, z), z) = f(x, y, z)

(2)

Input now a boundary condition (bc) for the unknownf(x, y, z) such that this bc does not depend on the independent variables {x, y, z}; this bc can however depend on arbitrary symbolic parameters, for instance

bc := f(alpha+beta, alpha-beta, 1) = alpha*beta

f(alpha+beta, alpha-beta, 1) = alpha*beta

(3)

With the recent development, this kind of problem can now be solved in one go:

sol := pdsolve([pde, bc])

f(x, y, z) = (1/4)*(x-2*z+2+y)*(x-y)*exp(z-1)

(4)

Nice! And how do you verify this result for correctness? With pdetest , which actually also tests the solution against the boundary conditions:

pdetest(sol, [pde, bc])

[0, 0]

(5)

And what has been done to obtain the solution (4)? First the PDE was solved regardless of the boundary condition, so in general, obtaining:

pdsolve(pde)

f(x, y, z) = _F1(-x+y, -x+z)*exp(x)

(6)

In a second step, the arbitrary function _F1(-x+y, -x+z) got determined such that the boundary condition f(alpha+beta, alpha-beta, 1) = alpha*beta is matched. Concretely, the mapping _F1 is what got determined. You can see this mapping reversing the solving process in two steps. Start taking the difference between the general solution (6) and the solution (4) that matches the boundary condition

(f(x, y, z) = _F1(-x+y, -x+z)*exp(x))-(f(x, y, z) = (1/4)*(x-2*z+2+y)*(x-y)*exp(z-1))

0 = _F1(-x+y, -x+z)*exp(x)-(1/4)*(x-2*z+2+y)*(x-y)*exp(z-1)

(7)

and isolate here _F1(-x+y, -x+z)

PDEtools:-Solve(0 = _F1(-x+y, -x+z)*exp(x)-(1/4)*(x-2*z+2+y)*(x-y)*exp(z-1), _F1(-x+y, -x+z))

_F1(-x+y, -x+z) = (1/4)*exp(-x+z-1)*(x^2-2*x*z-y^2+2*y*z+2*x-2*y)

(8)

So this is the value _F1(-x+y, -x+z) that got determined. To see now the actual solving mapping _F1, that takes for arguments -x+y and -x+z and returns the right-hand side of (8), one can perform a change of variables introducing the two parameters `τ__1` and `τ__2` of the _F1 mapping:

{tau__1 = -x+y, tau__2 = -x+z, tau__3 = z}

{tau__1 = -x+y, tau__2 = -x+z, tau__3 = z}

(9)

solve({tau__1 = -x+y, tau__2 = -x+z, tau__3 = z}, {x, y, z})

{x = -tau__2+tau__3, y = -tau__2+tau__1+tau__3, z = tau__3}

(10)

PDEtools:-dchange({x = -tau__2+tau__3, y = -tau__2+tau__1+tau__3, z = tau__3}, _F1(-x+y, -x+z) = (1/4)*exp(-x+z-1)*(x^2-2*x*z-y^2+2*y*z+2*x-2*y), proc (u) options operator, arrow; simplify(u, size) end proc)

_F1(tau__1, tau__2) = -(1/4)*exp(tau__2-1)*tau__1*(tau__1-2*tau__2+2)

(11)

So the solving mapping _F1 is

_F1 = unapply(rhs(_F1(tau__1, tau__2) = -(1/4)*exp(tau__2-1)*tau__1*(tau__1-2*tau__2+2)), tau__1, tau__2)

_F1 = (proc (tau__1, tau__2) options operator, arrow; -(1/4)*exp(tau__2-1)*tau__1*(tau__1-2*tau__2+2) end proc)

(12)

Wow! Although this pde & bc problem really look very simple, this solution (12) is highly non-obvious, as is the way to get it just from the boundary condition f(alpha+beta, alpha-beta, 1) = alpha*beta and the solution (6) too. Let's first verify that this mapping is correct (even when we know, by construction, that it is correct). For that, apply (12) to the arguments of the arbitrary function and we should obtain (8)

(_F1 = (proc (tau__1, tau__2) options operator, arrow; -(1/4)*exp(tau__2-1)*tau__1*(tau__1-2*tau__2+2) end proc))(-x+y, -x+z)

_F1(-x+y, -x+z) = -(1/4)*exp(-x+z-1)*(-x+y)*(x-2*z+2+y)

(13)

Indeed this is equal to (8)

normal((_F1(-x+y, -x+z) = -(1/4)*exp(-x+z-1)*(-x+y)*(x-2*z+2+y))-(_F1(-x+y, -x+z) = (1/4)*exp(-x+z-1)*(x^2-2*x*z-y^2+2*y*z+2*x-2*y)))

0 = 0

(14)

Skipping the technical details, the key observation to compute a solving mapping is that, given a 1st order PDE where the unknown depends on k independent variables, if the boundary condition depends on k-1 arbitrary symbolic parameters alpha, beta, one can always seek a "relationship between these k-1parameters and the k-1differential invariants that enter as arguments in the arbitrary function _F1 of the solution", and get the form of the mapping _F1 from this relationship and the bc. The method works in general. Change for instance the bc (3) making its right-hand side be a sum instead of a product

bc := f(alpha+beta, alpha-beta, 1) = alpha+beta

f(alpha+beta, alpha-beta, 1) = alpha+beta

(15)

sol := pdsolve([pde, bc])

f(x, y, z) = (x-z+1)*exp(z-1)

(16)

pdetest(sol, [pde, bc])

[0, 0]

(17)

An interesting case happens when the boundary condition depends on less than k-1 parameters, for instance:

bc__1 := subs(beta = alpha, bc)

f(2*alpha, 0, 1) = 2*alpha

(18)

sol__1 := pdsolve([pde, bc__1])

f(x, y, z) = ((x-z+1)*_C1+x-y)*exp(((z-1)*_C1+y)/(1+_C1))/(1+_C1)

(19)

As we see in this result, the additional difficulty represented by having few parameters got tackled by introducing an arbitrary constant _C1 (this is likely to evolve into something more general...)

pdetest(sol__1, [pde, bc__1])

[0, 0]

(20)

Finally, consider a nonlinear example

PDEtools:-declare(u(x, y))

u(x, y)*`will now be displayed as`*u

(21)

pde := 3*(u(x, y)-y)^2*(diff(u(x, y), x))-(diff(u(x, y), y)) = 0

3*(u(x, y)-y)^2*(diff(u(x, y), x))-(diff(u(x, y), y)) = 0

(22)

Here we have 2 independent variables, so for illustration purposes use a boundary condition that depends on only one arbitrary parameter

bc := u(0, alpha) = alpha

u(0, alpha) = alpha

(23)

All looks OK, but we still have another problem: check the arbitrary function _F1 entering the general solution of pde when tackled without any boundary condition:

pdsolve(pde)

u(x, y) = RootOf(-y^3+3*y^2*_Z-3*y*_Z^2+_Z^3-_F1(_Z)-x)

(24)

Remove this RootOf to see the underlying algebraic expression

DEtools[remove_RootOf](u(x, y) = RootOf(-y^3+3*y^2*_Z-3*y*_Z^2+_Z^3-_F1(_Z)-x))

-y^3+3*y^2*u(x, y)-3*y*u(x, y)^2+u(x, y)^3-_F1(u(x, y))-x = 0

(25)

So this is a pde where the general solution is implicit, actually depending on an arbitrary function of the unknown u(x, y) The code handles this problem in the same way, just that in cases like this there may be more than one solution. For this very particular bc (23) there are actually three solutions:

pdsolve([pde, bc])

u(x, y) = x^(1/3)+y, u(x, y) = -(1/2)*x^(1/3)-((1/2)*I)*3^(1/2)*x^(1/3)+y, u(x, y) = -(1/2)*x^(1/3)+((1/2)*I)*3^(1/2)*x^(1/3)+y

(26)

Verify these three solutions against the pde and the boundary condition

map(pdetest, [u(x, y) = x^(1/3)+y, u(x, y) = -(1/2)*x^(1/3)-((1/2)*I)*3^(1/2)*x^(1/3)+y, u(x, y) = -(1/2)*x^(1/3)+((1/2)*I)*3^(1/2)*x^(1/3)+y], [pde, bc])

[[0, 0], [0, 0], [0, 0]]

(27)

:)


Download PDEs_and_Boundary_Conditions.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Good day everyone,

 

I want to construct groebner bases over rings of differential Operators.

Thus I used the following:

 

with(Ore_algebra);

with(Groebner); N := 3;

A := skew_algebra(diff = [D[1], x[1]], diff = [D[2], x[2]], diff = [D[3], x[3]], comm = i, alg_relations = i^2+1); T := MonomialOrder(A, tdeg(D[1], D[2], D[3]));

A["polynomial_indets"];  [returns    {D[1], D[2], D[3]}]

A["rational_indets"];       [returns    {i, x[1], x[2], x[3]}]

 

So far everything seems as it should be: The ring i wanted to define here is the third Ring of  Differential operators over the field of complex 'rational' functions and maple returns that indeed it will handle the D[i] as monomials and the rest as coefficients for them.

 

Hover, when i use the Skew product, the following happens:

skew_product(x[1],D[1],A)                    [returns D[1]x[1]+1}]

skew_product(x[1],D[1],A)                    [returns D[1]x[1]]

Both is wrong, but maple seems to 'know' this. It used the correct relation to in the first product, the only thing it didn't do was switch D[1] and x[1]. I think maple handles the result of the skew product as if it was a commutative product and always places the D[i] at the left but still 'knows' what the actual result is.

The actual results should have been x[1]D[1]+1 for the first and x[1]*D[1] for the second product.

 

In the second product, it seems like maple treated x[1]*D[1] as if the Elements were switched already.

 

What i want though is for maple to correctly display the skew products and return the products so that in every summand the D[i] are at the right side and their coefficients are at the left side (and if possible (i do not know how to do that yet) sort the result of a skew product in a way that displays every different Power product of the D[i] with their coefficients, so that i get (x[1]+x[2])*D[2] and not x[1]*D[2]+x[2]*D[2]).

 

Can anyone help me here?

 


                              
                     
                   
                 

Is it possible to somehow extract a derivative from numeric solution of partial differential equation?

I know there is a command that does it for dsolve but i couldn't find the same thing for pdsolve.

The actual problem i have is that i have to take a numeric solution, calculate a derivative from it and later use it somewhere else, but the solution that i have is just a set of numbers an array of some sort and i can't really do that because obviously i will get a zero each time.

Perhaps there is a way to interpolate this numeric solution somehow?

I found that someone asked a similar question earlier but i couldn't find an answer for it.

How to solve delay differential equations with Maple?

Example:

diff(x(t),t) = 3*x(t)^2 + 0.3*x(x-0.03)

Hello everyoene, please i have a problem solving this delay differential equation:

y'(x)=cos(x)+y(y(x)-2)    0<x<=10

y(x)=1      x<=0

tau=x-y(x)+2

please i need the solution urgently

http://www.gap-system.org/Manuals/doc/ref/chap50.html

 

which group do four differential electromagnetism belong to in library available in gap system? 

what is the order of the group?

do maple 17 have this group? how to show?

guys ,

in a differential equation i want to expand its variable, but i  have some problem with it for exponential term :jadid.mw

 

 

thanks guys

 

 

1 2 3 4 5 6 7 Page 2 of 9