## 5356 Reputation

14 years, 317 days

## With or without tilde...

@itsme I don't know why the tilde is needed.  The diff command used to require a tilde in the same way but now it works on vectors and arrays without the tilde. It may just be that the int command has not caught up yet.

## The use of dyadics in continuum mechanic...

@ecterrab The sentence that you have quoted from Wikipedia about dyadics being obsolete refers to Gibbs' notation and terminology. He used ab to indicate the dyadic product of the vectors a and b. In modern notation one writes ab for that. That Wikipedia sentence is followed by "its uses in physics include continuum mechanics and electromagnetism". Any relatively modern (I mean post-1970s) book on continuum mechanics begins with the algebra of the dyadics, and the notation pervades the rest of the book. I spend a week or so on dyadics when I teach a course on continuum mechanics.

I like doing calculations in Maple to the extent possible.  But when calculating with the equations of motion of a continuum in anything other than Cartesian coordinates—this could be a problem as simple as flow of a fluid through a pipe—I end up going to paper and pencil since Maple does not provide a facility for calculating gradients of vectors in cylindrical or spherical coordinates. So if you get around to extending the Physics[Vectors] package in that direction, that would be a very welcome addition.

## Things are more complicated than that...

@nm Calculating the gradient of a vector field in Cartesian coordinates is straightforward. Things are more complicated in curvilinear coordinates such as cylindrical and spherical.

Look, for instance, at the gradient of the scalar field f(ρ,φ,z) in cylindrical coordinates. The correct answer is

or more explicitly,

The answer given by Senia Sheydvasser in what you have quoted, is equivalent to saying that the gradient is

which is obviously wrong.

See my reply to Edgardo on how to express the gradient of a vector field in cylindrical coordinates.

## A mini-lesson on gradients of vector fie...

@ecterrab In my original post I wrote that Gradient in Physics[Vectors] works as expected on scalar fields, but the Gradient of a vector field is not available. In your reply you are saying, in effect, that the Gradient of a vector field is not available. That's just what I said, isn't it?  We agree on that.

Now that we know that the Gradient of a vector field is not available in Physics[Vectors], can we do something to make it available? Consider this as a feature request.

As I wrote in my original post, calculating gradients of vector fields is central to continuum mechanics (including elasticity and fluid mechanics).  We don't want to ignore people who work in those fields, do we?

Perphaps the following mini-discourse will help shed light on what is needed. I know that you don't need a lesson on tensors, but plesae indulge me.

## Watch for singular points!...

@mehdibaghaee You have not specified initial conditions.  The method of solution depends on how the initial conditions relate to the differential equation's coefficients.  Specifically, you need to watch out for when the coefficients of the highest order derivatives take on zero values. The subject is covered under the topic of regular and irregular singular points in textbooks in differential equations. Singular equations generally require special treatment, not in Maple, but by doing some math on paper, which in many cases can turn into mini-projects. The point is, just writing random differential equations is not very useful. If your equations arise in a specific application. explain what the application is, how you arrive at the differential equations, what the initial conditions are, what is the time range over which you are seeking a solution, etc.  The more details you provide, the better answers you will receive

Here is a simple illustration of applying Maple's numeric solver to a system which has no singular points.

 > restart;
 > de1 := (1+t^2)*diff(x__1(t),t,t) + sin(t)*diff(x__2(t),t) + cos(t)*x__1(t) = cos(2*t);

 > de2 := (1+t+t^2)*diff(x__2(t),t,t) + cos(t)*diff(x__2(t),t) + sin(t)*x__1(t) = 1/(1+t^2);

 > ic := x__1(0)=0, D(x__1)(0)=0, x__2(0)=0, D(x__2)(0)=-1;

 > dsol := dsolve({de1,de2,ic}, numeric);

 > plots:-odeplot(dsol, [[t,x__1(t)], [t,x__2(t)]], t=0..Pi, color=[red,blue]);

## @mehdibaghaee I can't tell whet...

@mehdibaghaee I can't tell whether it is intentional or not, but each of the 5 differential equations you have shown contains a single unknown.  Therefore each of the 5 equations may be solved independently of the other others.  In short, the equations are decoupled.

There is no symbolic solution, in general, for second order equations with variable coefficients. In the two concrete cases that you have shown, the coefficients seem to be taken quite arbitrarily, and therefore you should not expect symbolic solutions.  The following code confirms that Maple is unable to find symbolic solutions:

```de := (t-sin(t))*diff(x(t),t,t) + (1-t^3)*diff(x(t),t) + (t^2+t-1)*x(t) = cos(t) - t;
dsolve(de, x(t));   # returns unevaluated
de := (t^5-1)*diff(x(t),t,t) + (t-t^3)*diff(x(t),t) + (t^5 + t^2 + 2)*x(t) = t^3 + 1;
dsolve(de, x(t));   # returns unevaluated```

Special cases of second order equations that admit symbolic solutions are discussed extensively in most books on differential equations.  Look up, for example, Bessel's equation, Legendre's equations, Euler's equations, etc.

Of course, differential equations with variable coefficients may be solved numerically if you specify explicit expressions for the coefficients, and provide appropriate initial conditions.

## Both expressions that you have provided ...

Both expressions that you have provided for W are syntactically correct in Maple, so the meaning of "Please tell me how to write such a conditional maple statement" is unclear.  You need to explain more details to get a helpful answer.

## Out to outdo Rip Van Winkle...

I don't know exactly how long it's been, but I know that it's been quite a while.

I hope that this website's maintainer is not out to outdo Rip Van Winkle.

## Response...

@Suy I don't see a question in what  @tomleslie has written.  I see the question "cartesian ???" in your post but I don't understand what you mean by that.

If you need further input, then edit and add a corrected statement in your original post. Don't delete any of the previous material because that will invalidate the existing answers.

## Why is it wrong?...

and Maple says "undefined", which is the correct answer.  But you have added a comment that says "This isn't a very useful answer and its wrong".  What do you expect to get for the value of that integral?

@Sradharam Your original question said: "Suppose u and v are dependent variables and x,y,z are independent variables".  In what you posted in your reply you have p as the dependent variable and x, y, z, u, v as the independent variables.

You won't get many useful replies by just throwing apparently random equations, without precise statements and without explaining why you are interested in these, the context in which they arise, and what the boundary conditions are.

## What are the PDEs?...

What you have shown are the ordinary differential equations that arise from solving a system of PDEs, but you have not shown the PDEs themselves.  What are they?

@acer That's excellent. So it turns out that the solution is not as complicated as it initially seemed, but certainly not obvious, at least to me.  I am going to save this for future use.  Vote up!