Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

A very nice demo.  Vote up!

I would be interested in reproduding this in Maple as I don't have MapleSim.  Can you post the complete set of this demo's parameters?

@Muhammad Usman XJTU As tomleslie as noted, your ode1 with the intitial condition phi(0)=0 admits a unique solution.  Isn't that all you need?  If you have something else in mind, then you should state it clearly, because I find it impossible to understand what you are aiming to do by looking over your worksheet.  It will help if you present your question in words, not in Maple.

@mmcdara That's a good alternative.  But in going over both your solution and my previous solution, I see that it's possible to streamline the process quite a bit. Here it is.

restart;

We have five differential equations:

de1 := diff(u__1(y),y,y) + 1/2*diff(N(y),y) + 1/2*theta__1(y) = 0;

diff(diff(u__1(y), y), y)+(1/2)*(diff(N(y), y))+(1/2)*theta__1(y) = 0

de2 := diff(N(y),y,y) - 2/3 * (2*N(y) + diff(u__1(y),y)) = 0;

diff(diff(N(y), y), y)-(4/3)*N(y)-(2/3)*(diff(u__1(y), y)) = 0

de3 := diff(theta__1(y),y,y) = 0;

diff(diff(theta__1(y), y), y) = 0

de4 := diff(u__2(y),y,y) + theta__2(y) = 0;

diff(diff(u__2(y), y), y)+theta__2(y) = 0

de5 := diff(theta__2(y),y,y) = 0;

diff(diff(theta__2(y), y), y) = 0

Find the general solution:

dsol__general := dsolve({de1,de2,de3,de4,de5});

{N(y) = exp(y)*_C2-exp(-y)*_C3+(1/3)*_C10*y+(1/6)*_C9*y^2+_C4, u__1(y) = -2*_C4*y-(1/3)*_C10*y^2-(1/9)*_C9*y^3-(1/2)*exp(y)*_C2-(1/2)*exp(-y)*_C3+(1/2)*_C9*y+_C1, u__2(y) = -(1/6)*_C7*y^3-(1/2)*_C8*y^2+_C5*y+_C6, theta__1(y) = _C9*y+_C10, theta__2(y) = _C7*y+_C8}

How many integrations constants?

indets(dsol__general, name);

{_C1, _C10, _C2, _C3, _C4, _C5, _C6, _C7, _C8, _C9, y}

So there are 10 integration constants, which is good since we have 10 boundary and interface conditions.

 

Let's evaluate the solutions and their first derivatives at y = -1, y = 0, y = 1:

dsol__general union diff~(dsol__general, y):
convert(%, D):
conditions := eval(%, y=-1) union eval(%, y=0) union eval(%, y=1):

Now let us look at the boundary and interface conditionsj.

bc := {
             # conditions at y=-1
             u__1(-1) = 0,
                N(-1) = 0,
         theta__1(-1) = 1,

             # conditions at y=0
             u__1(0) = u__2(0),
         theta__1(0) = theta__2(0),
      D(theta__1)(0) = D(theta__2)(0),
             D(N)(0) = 0,
          D(u__1)(0) + 1/2*N(0) = 1/2*D(u__2)(0),

             # conditions at y=+1
             u__2(1) = 0,
         theta__2(1) = 0
};

{(D(u__1))(0)+(1/2)*N(0) = (1/2)*(D(u__2))(0), N(-1) = 0, u__1(-1) = 0, u__1(0) = u__2(0), u__2(1) = 0, theta__1(-1) = 1, theta__1(0) = theta__2(0), theta__2(1) = 0, (D(N))(0) = 0, (D(theta__1))(0) = (D(theta__2))(0)}

Apply the previously calculated expressions for u__1(-1), (D(u__1))(-1), etc., to the boundary conditions:

eqns := eval(bc, conditions);

{_C10 = _C8, _C9 = _C7, _C10-_C9 = 1, -(3/2)*_C4+(1/2)*_C9 = (1/2)*_C5, _C7+_C8 = 0, _C2+_C3+(1/3)*_C10 = 0, -(1/2)*_C2-(1/2)*_C3+_C1 = _C6, -(1/6)*_C7-(1/2)*_C8+_C5+_C6 = 0, exp(-1)*_C2-exp(1)*_C3-(1/3)*_C10+(1/6)*_C9+_C4 = 0, 2*_C4-(1/3)*_C10-(7/18)*_C9-(1/2)*exp(-1)*_C2-(1/2)*exp(1)*_C3+_C1 = 0}

Solve this system of 10 equations in the 10 unknown coefficients:

the_coeffs := solve(eqns);

{_C1 = -(1/6)*(6*exp(-1)*exp(1)-21*exp(-1)-5*exp(1))/(11*exp(-1)+9*exp(1)), _C10 = 1/2, _C2 = -(1/18)*(27*exp(1)-67)/(11*exp(-1)+9*exp(1)), _C3 = -(1/18)*(33*exp(-1)+67)/(11*exp(-1)+9*exp(1)), _C4 = -(1/36)*(12*exp(-1)*exp(1)+35*exp(-1)+53*exp(1))/(11*exp(-1)+9*exp(1)), _C5 = (1/12)*(12*exp(-1)*exp(1)-31*exp(-1)-exp(1))/(11*exp(-1)+9*exp(1)), _C6 = -(1/12)*(12*exp(-1)*exp(1)-53*exp(-1)-19*exp(1))/(11*exp(-1)+9*exp(1)), _C7 = -1/2, _C8 = 1/2, _C9 = -1/2}

Apply the calculated coefficients to obtain the final form of the solutions to the ODEs:

dsol := eval(dsol__general, the_coeffs);

{N(y) = -(1/18)*exp(y)*(27*exp(1)-67)/(11*exp(-1)+9*exp(1))+(1/18)*exp(-y)*(33*exp(-1)+67)/(11*exp(-1)+9*exp(1))+(1/6)*y-(1/12)*y^2-(1/36)*(12*exp(-1)*exp(1)+35*exp(-1)+53*exp(1))/(11*exp(-1)+9*exp(1)), u__1(y) = (1/18)*(12*exp(-1)*exp(1)+35*exp(-1)+53*exp(1))*y/(11*exp(-1)+9*exp(1))-(1/6)*y^2+(1/18)*y^3+(1/36)*exp(y)*(27*exp(1)-67)/(11*exp(-1)+9*exp(1))+(1/36)*exp(-y)*(33*exp(-1)+67)/(11*exp(-1)+9*exp(1))-(1/4)*y-(1/6)*(6*exp(-1)*exp(1)-21*exp(-1)-5*exp(1))/(11*exp(-1)+9*exp(1)), u__2(y) = (1/12)*y^3-(1/4)*y^2+(1/12)*(12*exp(-1)*exp(1)-31*exp(-1)-exp(1))*y/(11*exp(-1)+9*exp(1))-(1/12)*(12*exp(-1)*exp(1)-53*exp(-1)-19*exp(1))/(11*exp(-1)+9*exp(1)), theta__1(y) = -(1/2)*y+1/2, theta__2(y) = -(1/2)*y+1/2}

plots:-display(
        plot(eval(u__1(y),dsol), y=-1..0, color=red),
        plot(eval(u__2(y),dsol), y=0..1, color=blue),
labels=[y, u(y)]);

plots:-display(
        plot(eval(theta__1(y),dsol), y=-1..0, color=red),
        plot(eval(theta__2(y),dsol), y=0..1, color=blue),
labels=[y, theta(y)]);

plot(eval(N(y),dsol), y=-1..1, color="Green", labels=[y, N(y)]);

 

 

Download mw2.mw

 

You wrote:

Is there a way to get the function f(x) to adhere to the rules imposed on it by the text in the book? If that can be done, the answering of the questions will be a lot easier!

Sure, it will be a lot easier with Maple, but that's not the goal—there is nobody out there holding their breath waiting for your answer.  The point of the exercise is to process it in your head so that it becomes a second nature to you.

That reminds me of the athlete who considered riding a motorcycle along the length of the 10 km running track as sufficient training.  He was able to reach the end of the course.  Wasn't that the goal?

@Preben Alsholm Hello again, Preben.  Your calculations and their explanations are insightful and thorough.  You have extracted more juice from this problem than I had thought possible.

I have been late in responding to your posts due to an overload of tasks that need immediate attention.  I have made a bookmark of this page so that I may return to it to read your analysis in a more leisurely manner.

 

@Preben Alsholm Hello Preben, thanks for your remarks. I will be away from my computer this evening.  Will go through the details of your post tomorrow.

@dtn "Linear" and "nonlinear" are very specific technical terms.  Merely calling something "nonlinear" does not make it nonlinear. I am afraid that you have a malformed idea of what a nonlinear differential equation means.

Just about every elementary book on differential equations has a section/chapter on linear first order equations.  These are equations of the form x'(t) = p(t) + q(t)*x(t).  Your equation falls in that category, that is, it is a linear first order equation.

The article that you have cited provides conditions under which a nonlinear equation may be approximated by a linear equation. You don't have a nonlinear equation, therefore the methods of that article do no apply in your case.

 

@dtn One linearizes a nonlinear equation. Your equation is already linear. I can make no sense of your request of linearizing a linear equation.

I suggest that you attempt to solve your problem the best you can—after all, you must have read and understood the article that you have cited—and then post the Maple worksheet of your attempt.  That will tell in less vague terms what it is that you are trying to achieve, and people will then provide advice if you need help with Maple.

 

 

@Pepini You have done a good job in following the outlined steps.  To get the correct curve, you need to change the line

N1 := simplify(N/Norm(N))

to

N1 := simplify(N/Norm(N,2))

See the documentation of Norm for explanation.

@Pepini How did you get the equation of the green curve?  You have plotted it in the range t=0..Pi/4.  If you plot it in the range t=0..2*Pi you will see that it is far from being a great circle.

Here is a sketch of how to obtain the correct equation of the green curve, assuming that you want it to be an arc of a great circle.

Let A and B be the points of intersection of the green curve with the blue and red curves, respectively.  The Cartesian coordinates of those points are known.  Consider A and B as the endpoints of unit vectors emanating from the origin.  The green curve lies in the plane formed by those two vectors.  Call that plane P.

The vector N = A x B (the cross product) is perpendicular to the plane P.  Normalize N by dividing it by its own length.

Let M = N x A.  Then M is a unit vector that lies within the plane P and is perpendicular to A.  Thus, the pair (A, M) forms an orthonormal basis within the plane P.  The parametric equation of the great circle corresponding to the green curve is C(t) = A*cos(t) + M*sin(t).

We have C(0) = A.  We want to find T so that C(T) = B.  We note that C(T) = B is three equations in one unknown, T.  So any of the three equations may be used to solve for T.  The middle equation is the simplest.  Solving it we obtain 

T:= arctan(sqrt(2)*sqrt(13 - 2*sqrt(2))/(2 + sqrt(2)))

Finally, we perform the integration that you have shown in your original question, and arrive at the expression for the curve length that I showed in my previous reply.

 

@acer Thanks for looking into this.  As you and mmcdara have noted, this used to work properly in earlier versions of Maple.  I will report the issue to Maple Support.

PS: Oops, I just noticed that you said that you will file a report.  I won't submit a report then.

 

@mmcdara Thanks for verifying the issue and especially pointing out that this used to work correctly in earlier versions.  I will file a report with Maple Support.

@Kitonum Thanks for confirming the issue and supplying a workaround.  As mmcdara has noted, this is indeed a bug.  I will let Maple Support know.

@nm You don't want u(0,theta)=0.  You want u(0,theta) to be finite.  So we go back to the solution that you have obtained

and apply expand() to get

We see that the last term blows up at the origin. To remove that signularity, we let _C2 = 0:
factor(eval(sol, _C2=0));

which is the correct solution.

 

@vv Those are good observations.  I wonder how Maple arrives at zeros for the values of those integrals.

First 26 27 28 29 30 31 32 Last Page 28 of 99