Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@MrMarc 

As I said earlier, your system is guaranteed to have the solution {x=0, y=0, z=0}.  If you want a nonzero solution, then you will have to impose the extra condition -100*b*p-p*r+100*a+100*p-r = 0 on the coefficients.  If we solve that condition for r, we get r = (100*(-b*p+a+p))/(p+1).

Plugging in the numbers that you have given for a, b, and p we get r = 13.28571429 which is close to your value of r = 13.29.  That's why it appears to you that you are getting a well-defined solution but that's only an illusion.

You should know that if r is anything other than what I have shown, then the only legitimate solution is {x=0, y=0, z=0}.  If r is exactly what I have shown, then x can be anything, while y = p*x.  For example, with your choice of p = 2.5 and x = 215054, we get y =  p*x = 537635 as you have noted.  But you could taken any other x, let's say x = 1234, in which case you will have y = 1234*p = 3085, and that would have been just as good a solution.

 

@Earl The change of variable from alpha to t in vv's calculations is not essential.  It's possible to do the calculation directly with alpha.
 

restart;

path := y = x*tan(alpha) - g*x^2/(2*u^2*cos(alpha)^2);

y = x*tan(alpha)-(1/2)*g*x^2/(u^2*cos(alpha)^2)

(1)

eval(path, {x=a, y=h}):
u2 := isolate(%, u^2);

u^2 = (1/2)*g*a^2/((-h+a*tan(alpha))*cos(alpha)^2)

(2)

diff(rhs(u2), alpha):
solve(%, alpha):
alpha__u__min := select(s -> is(s>0), %) assuming positive;

arctan((h+(a^2+h^2)^(1/2))/a)

(3)

eval(u2, alpha=alpha__u__min):
radnormal(%):
u__min := sqrt(rhs(%));

(g*(h+(a^2+h^2)^(1/2)))^(1/2)

(4)

 

Download projective-alt.mw

@vv Thanks for the pointer to showstat(log) which clearly shows the use of the optional bracketed arguments in Maple's log[b](a) procedure.

What you have shown works for me.  Try re-executing your worksheet.


Aside: Where you have said PLOT(...) I would have said display(...).

@vv I looked up several help pages pertaining to Maple's procs but was unable to find a reference to the f[u](x) construct.  It must be hidden in an obscure place.

Carl, what I am asking is why is it that g[12] has any meaning at all?  Where is such a construct defined/documented?

@vv Your construction puzzles me.  Let's look at a simpler case:

g := x -> x^2;

Then g(5) returns 25.  I also see that g[12](5) returns 25 but I don't understand why.  What is the meaning of g[12]?  Would you please explain?

 

@Volker Lehner Short answer: To enter new material inside a procedure, type Shift-Enter.

For anything other than toy programs, I must echo acer's suggestion of using 1D input plus the "Worksheet" instead of the "Document" mode.  You will find instructions https://userpages.umbc.edu/~rostamia/math481/config/maple.html

As far as I know, you cannot convert your existing worksheet.  Configure Maple as instructed, then open a fresh new worksheet.

I cannot understand your equations.  Nor can Maple.  You can help yourself by writing a more readable code,  How many differential equations do you have?  How many unknowns?  I suggest something like:

de1 := diff(f(eta), eta, eta, eta) + ...
de2 := ...
de3 := ...
bc := f(0)=1, D(f)(0)=...

and then

dsol := dsolve([de1, de2, de3, ..., bc], numeric);

 

@Volker Lehner In your worksheet some of the entries are German text and some others are Maple code.  Therefore I assume that you know how to enter text and code as needed.

You entered my code as text in your document.  But you should have entered it as code. Here I have corrected that and have illustrated how to run the procedure.  My comments are in red.

Berechnungen-1-fixed.mw

@Preben Alsholm That's very nice analysis.  The "magic" happens between ineq1 and inqe2.  The calculation up to and including ineq1 is consistent with y(x)≥ 0. The strict inequality, y(x) > 0, enters in the separation of variables calculation that takes us from iineq1 to ineq2. Quite insightful.

@JohnS I just posted a response to oceanxinlie in which I explained some of the details of the calculations, including how Lcrit was calculated.  The title of the post is "Details".

@oceanxinlie You asked:

Can I know where do you find the elementary function for solving this differential equation, is it very famous?

Your differential equation y'' = a*y^q has quite a simple form, therefore is not difficult to guess that it must have a solution of the form y(x) = A*x^B.

To determine A and B, we substitute that guess into the equation and equate the exponents of x on both sides and arrive at B = 2/(1-q).  Then we equate the coefficients of x on both sides, whence we arrive at the value of A that you see in the worksheet.

The solution y(x)=A*x^B has the property that y(0)=0 and y'(0)=0.  This does not solve your boundary value problem because you want y(0)=0 and y'(L)=b.  But that's alright.  You want L=2945 but let's ignore that for the moment.  Let's find a different value of L, let's call it Lcrit, so that y'(Lcrit)=b.  Since y(x)=A*x^B, this says A*B*Lcrit^(B-1) = b.  We solve this equation for Lcrit and arrive at the value of Lcrit given in the worksheet.

This would be the end of our calculations if your L were exactly equal to Lcrit.  But it isn't.  Your L is quite a bit larger than Lcrit.  But that's not a problem.  It is not hard to see that if a function y(x) solves the differential equation, then the shifted function y(x-k) also solves the equation for any k.  So we pick k = L − Lcrit so that the shifted function satisfies your desired boundary condition when x = L.

We fill the gap on the x axis between the origin and the shifted function by zero.  This is a well-known idea which Preben immediately recognized with his comment about y(x0) and y'(x0).

You also asked:

Can you show me the code of numerical solution?

That's exactly what Preben did in his first example.  He took L=450 which is less than Lcrit, and found the solution numerically.

The usual numerical methods don't work when L is larger that Lcrit, but that's not a problem because in that case we have an exact solution as shown in the worksheet.

In the rest of your comments you say that you had hoped for a solution which is not flat zero on a part of the interval.  As far as I can see, if L > Lcrit, that zero part cannot be avoided.  Mathematically there is nothing wrong with that.  If you are applying the result to some physical model, you will have to see what that is saying about the model.

 

@mohammad1369 If I understand your question correctly, you want to write Ax instead of A.  You enter Ax in Maple by typing A__x, that is, A followed by two underscore characters and an x.  For example:

A__x := <a, b; c, d>;

 

@Les Sure, there is nothing preventing from putting that construction inside a procedure.

First 61 62 63 64 65 66 67 Last Page 63 of 91