Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@nm You wrote: "but it is d'Alembert ode. Maple itself says so". 

Yes, I see that Maple says so.  But look up the definition of the d'Alembert ODE in the help page that I noted in my answer.  Compare that with your ODE.  Is yours of that form?  No!  To put it in that form, you need to square the two sides of your ODE as I explained before.  Probably that's what Maple does (unwisely) when it declares that your ODE is of d'Alembert type.

If you replace the right-hand side of your ODE by its negative, you obtain a completely different ODE.  However, the distinction between the two ODEs disappears when you square the two sides. You can have no assurance that the solution of the squared ODE is that of one or the other ODE.

It's not difficult to verify that the two solution produced by Maple's d'Alembert's method are solutions to the ODE with the changed sign.  Neither one is a solution of your original ODE.

Maple's calculation is correct, but Maple Learn's interpretation of the result is wrong.

The constraint g=x+y=0 is equivalent to y=−x, and therefore the function f = x*y subject to that constraint reduces to f = −x^2 which has a maximum at x=0, not a saddle. That's also evident just by looking at the accompanying plot.

PS: The error lies in the getVals( ) function where SecondDerivativeTest( ) is applied to f while ignoring the constraint.

@vv That's exactly how I have been solving these equations.  I had hoped that Maple may help automate the process.

@tomleslie Thanks for confirming the fix in the Physics update.  I don't have Maple 2022 which is required for that fix.  I will try it out later when I get my hands on Maple 2022.

As I had noted in my original question, my ODE of interest is significantly more complex than the toy example I had posted.  I had only partial success with applying the suggestions that I have received from Acer and Edgardo.  The following worksheet shows the issue.

restart;

interface(showassumed=0):

assume(b > a);

Maple solves this ODE correctly:

de1 := diff(u(x),x$4) = Heaviside(x - a)*u(x);

diff(diff(diff(diff(u(x), x), x), x), x) = Heaviside(x-a)*u(x)

dsol1 := dsolve(de1, u(x), parametric);

dsol1 := u(x) = piecewise(x < a, (1/6)*_C1*x^3+(1/2)*_C2*x^2+_C3*x+_C4, a <= x, ((1/24)*(a^3-3*a^2+6*a-6)*exp(-x+a)+(1/24)*(a^3+3*a^2+6*a+6)*exp(x-a)+(1/24)*((2*a^3-12*a)*cos(x)+(6*a^2-12)*sin(x))*cos(a)+(1/12)*sin(a)*(a^3*sin(x)-3*a^2*cos(x)-6*a*sin(x)+6*cos(x)))*_C1+((1/8)*(a^2-2*a+2)*exp(-x+a)+(1/8)*(a^2+2*a+2)*exp(x-a)+(1/8)*(2*a^2*cos(x)+4*a*sin(x)-4*cos(x))*cos(a)+(1/4)*sin(a)*(a^2*sin(x)-2*a*cos(x)-2*sin(x)))*_C2+((1/4)*(a-1)*exp(-x+a)+(1/4)*(a+1)*exp(x-a)+(1/4)*(2*a*cos(x)+2*sin(x))*cos(a)+(1/2)*sin(a)*(a*sin(x)-cos(x)))*_C3+((1/2)*cos(a)*cos(x)+(1/2)*sin(a)*sin(x)+(1/4)*exp(x-a)+(1/4)*exp(-x+a))*_C4)

That's the correct solution.  Let's verify continuity at x = a:

simplify(limit(dsol1, x=a, left) - limit(dsol1, x=a, right));

0 = 0

 

but it has trouble with solving this one:

de2 := diff(u(x),x$4) = Heaviside(x - a)*u(x) - Heaviside(x - b)*u(x);

diff(diff(diff(diff(u(x), x), x), x), x) = Heaviside(x-a)*u(x)-Heaviside(x-b)*u(x)

dsol2 := dsolve(de2, u(x), parametric);

dsol2 := u(x) = piecewise(x < a, (1/6)*_C1*x^3+(1/2)*_C2*x^2+_C3*x+_C4, x < b, _C1*exp(x)+_C2*exp(-x)+_C3*sin(x)+_C4*cos(x), b <= x, (1/6)*_C1*x^3+(1/2)*_C2*x^2+_C3*x+_C4)

That's certainly wrong.  The solution is not even continuous!

simplify(limit(dsol2, x=a, left) - limit(dsol2, x=a, right));

0 = (1/6)*_C1*a^3+(1/2)*_C2*a^2+_C3*a+_C4-_C1*exp(a)-_C2*exp(-a)-sin(a)*_C3-_C4*cos(a)

 

Download fourth-oder-ODE.mw

Hi Edgardo, that's the quickest ever turnaround of a software fix.  Awsome!

And thanks for pointing out the [exact] option.  I didn't know about it either.

As to the documentation of the parametric option, I went to ?dsolve,details and followed the link parametric solving scheme.  That takes to a page that describes a scheme from Kamke's book.  But the focus there is on first order nonlinear equations.  I could not relate the discussion there to my second order linear equation.  Perhaps I am looking in the wrong place.

PS: I just ran into a related issue.  I will post it as a followup to my original question.  

@acer That's excellent.  I haden't used the parametric option to dsolve before, so I looked up the documentation.  On the first reading, it's not clear to me what Maple does with that option behind the scenes, but it does the right thing anyway, so I am happy.  Thanks for your answer!

If then your expression for T(t) reduces to T(t)=15.  Probably that's not what you meant.  Double-check your statement!

@Tamour_Zubair As I wrote before, expressing a nonlinear system through matrices is not very productive.  To see that, consider this simple system of nonlinear ODEs:

 

diff(x(t),t) = x(t) + y(t);
diff(y(t),t) = x(t) * y(t);

diff(x(t), t) = x(t)+y(t)

diff(y(t), t) = x(t)*y(t)

Can you tell me how you would like write that as a system with matrices?  And if you do so, in what way will that be useful to you?

 

@Joe Riel I installed the latest version of Bark.  Thanks!

I still see no examples directory but that's alright since from what I have figured out by now, this is not something that will be of very much use to me.

@tomleslie Your statement is true in principle, however that's not the source of OP's problem. Without the symbolic option to simplify() in his worksheet, his calculations would yield the correct result.

@Joe Riel I was intrigued with that description of Bark so I installed it (along with the prerequisite TextTools).

Bark's help page says "The examples subdirectory of the Bark toolbox contains the Maple source for a few shell commands created with Bark."  I am unable to find the examples subdirectory.  This is all there is:

[14:13 shadow]~> tree maple
maple
└── toolbox
    ├── Bark
    │   ├── lib
    │   │   ├── Bark.help
    │   │   └── Bark.maple
    │   ├── uninstall_manifest.mtxt
    │   └── version.txt
    └── TextTools
        ├── lib
        │   ├── TextTools.help
        │   └── TextTools.maple
        ├── uninstall_manifest.mtxt
        └── version.txt

After reading Bark's help page, and not having the examples subdirectory, I have the following questions:

  1. Does one execute the shell script (generated by Bark) from within Maple or directly from the Linux command-line?
  2. If the latter, then is the shell script self-contained?  That is, can it be executed without Maple present?
  3. If the shell script needs Maple to run, then what is its utility? That is, why would one want to run the shell script instead of the original Maple program?

Would you please clarify?

@tomleslie When a point mass slides down a frictionless incline of angle alpha relative to the horizontal, its weight mg gets decomposed into a normal force to the incline, mg cos α, and a tangential force, mg sinα. So yes, there is a tangential force, and therefore a tangential acceleration.

The isochrone property of the semi-cubical parabola is cited in numerous websites.  It appears that it originated in the Mac Tutor website, and other websites just copied that information without verifying it.  Here is what Mac Tutor says:

In 1687 Leibniz asked for the curve along which a particle may descend under gravity so that it moves equal vertical distances in equal times. Huygens showed that the semi-cubical parabola x^3 = ay^2 satisfied this property.

On the face if it, that statement is nonsensical—it says that the vertical component of a particle's velocity sliding down that curve is a constant.  But that can't be true.   Consider a particle released from rest from a point P on the curve.  The intial velocity is zero, and therefore the vertical component of the initial velocity is zero. Later on the particle picks up speed, so the vertical component of the velocity is nonzero.  We see that the vertical component of the velocity changes, so it cannot be a constant, contrary to the Mac Tutor's assertion.

I don't know the correct statement of Leibniz's question and Huygens' solution, but certainly Mac Tutor's formulation and dozens of duplications around the net are not it.

 

Interesting puzzle.  Here is a clearer restatement.  I have not attempted to solve it.

restart;

with(plots):

display(
        pointplot([[1,1], [2,1], [3,1], [4,1], [5,1], [6,1], [7,1]], color=black),
        pointplot([[1,2], [2,2], [3,2], [4,2], [5,2], [6,2], [7,2]], color=red),
        pointplot([[1,3], [4,3], [5,3], [7,3], [1,4], [4,4], [5,4], [7,4] ], color=yellow),
        pointplot([[2,3], [3,3], [6,3], [2,4], [3,4], [6,4]], color=pink),
        pointplot([[1,5], [3,5], [5,5], [7,5], [1,6], [3,6], [5,6], [7,6]], color=brown),
        pointplot([[2,5], [4,5], [6,5], [2,6], [4,6], [6,6]], color=purple),
        pointplot([[1,7], [2,7], [7,7], [1,8], [2,8], [7,8], [1,9], [2,9], [7,9]], color=blue),
        pointplot([[3,7], [5,7], [3,8], [5,8], [3,9], [5,9]], color=green),
        pointplot([[4,7], [6,7], [4,8], [6,8], [4,9], [6,9]], color="Orange"),
symbol=solidcircle, symbolsize=50, axes=none);

 

Puzzle: Rearrange the color disks, by moving them up or down (not horizontally),

so that there remain no repeated colors in each row.

Download mw.mw

PS: I see that Christian Wolinski has already said the same thing.  Sorry for the repetition.

 

First 19 20 21 22 23 24 25 Last Page 21 of 99