C_R

3537 Reputation

21 Badges

6 years, 60 days

MaplePrimes Activity


These are answers submitted by C_R

You could use this alternatively

Optimization:-Minimize(G(x, y), x = 0 .. 1, y = 0 .. 1);
       [-0.710208044926744719, 

         [x = 0.894924318449926, y = 0.971579686253484]]

For the functions you have to load a Student package. Paste this in an input line

with(Student[VectorCalculus]);
Hessian(sqrt(81 + (u + 5)^2) + sqrt(49 + (v - 3)^2) + sqrt(4 + (v - u + 1)^2), [u, v]);
Gradient(sqrt(81 + (u + 5)^2) + sqrt(49 + (v - 3)^2) + sqrt(4 + (v - u + 1)^2), [u, v]);

For the long brackets and > push on or Insert -> Execution group

The semicolon terminates a statement in an input line. It's called the statement separator. Enter help(";") for more.

For a 3d plot enter ?plot3d

Before doing that you might want to follow the startup page. 

If you cannot find it, navigate to View->Home

Restart resets Maple. It basically "forgets" all input and computation results.

 

According to equation (13) of ?odeadvisor,Chini the following ode is Chini

ode := diff(y(x),x)=a*y(x)^n+b*x^(n/(1-n));
DEtools:-odeadvisor(ode)
                                            /  n  \
                                            |-----|
                     d               n      \1 - n/
             ode := --- y(x) = a y(x)  + b x       
                     dx                            

               [[_homogeneous, class G], _Chini]

Meaning for me in

Chini_ode := diff(y(x), x) = f(x)*y(x)^n - g(x)*y(x) + h(x)
                   d                  n                   
     Chini_ode := --- y(x) = f(x) y(x)  - g(x) y(x) + h(x)
                   dx                                     

 that f, g , h can be constant (functions)
 

f(x)=a,g(x)=0,h(x)=b*x^(n/(1 - n));
subs(%,Chini_ode);
                                           /  n  \
                                           |-----|
                                           \1 - n/
             f(x) = a, g(x) = 0, h(x) = b x       

                                        /  n  \
                                        |-----|
                 d               n      \1 - n/
                --- y(x) = a y(x)  + b x       
                 dx                            

My understanding from the explanations from @ecterrab is that odeadvisor does not necessarily returns all matching types. In your case Chini is maybe not considered an appropriate method and therefore not suggested. This would fit to your observation of a division by zero error.

What is still unclear for me is the otherwise in: "odeadvisor might return more than one type; otherwise, the first matching of a pattern interrupts the process and a classification is returned". Why is in this case the pattern matching process interrupted in others (see above) not.

`dsolve/methods`[1]
  [quadrature, linear, Bernoulli, separable, inverse_linear, 

    homogeneous, Chini, lin_sym, exact, Abel, pot_sym]


If called without options, odeadvisor is not a classification command that retruns all types. It is supposed to be a "classification and suggestion" command. Meaning it retruns all classifications of suggested methods to solve. If this is the correct interpretation, the help page needs a bit more clarification. I am saying that because I read it serveral times and interpreted it differently in the beginning.

 

How your question is posed there is no answer because to analyse convergence a comparision is requried.
In your case you want at least compare G[11]=G[11](num) against G[11]=G[11](num+1) and so on.
Since G[11] still depends on 4 undefined variables

indets(G[11],name) minus indets(G[11],constant)
                        {eta, x, xi, y}

a comparision is practically impossible.

From general standpoint you frist want to know if a series converges at all

limit(G[11],num=infinity)

Then you want to see whether the error for a given n is acceptable for you.

 

It has nothing to do with dsolve. It is the piecewise definition which does not create thrust.

Try deleteting the last condition everywhere (here shown for the mass)

MASS := piecewise(t <= TF1[1], 0, TF1[1] < t and t <= TF1[2], Mdot, TF2[1] < t and t <= TF2[2], Mdot, TF2[2] <= t, 0)

Please share the fixed solution. Save travels!

dsolve_piecewise.mw

Update:

I have to revise my statement. The variable step solver does not capture the second event (which is rather short).
Attached are a few settings that work for the mass equation. Using them in the original problem does not show a difference. You have to check the force terms.
dsolve_piecewise_2.mw

Try disabling autofill and/or delete all browser data (crtl-shift-del under Windows) in the settings

At a first glance, you could devide the first and thrid equation by cos(theta__3). Then solve the equation for tan(theta__3) and equated them to a new equation.

Do the same for the second and fourth equation by deviding by cos(Theta_4).

Now you have two equations depending on a__1 and c__1 that you can solve. At a first glance you will need fsolve for it.

theta__3 and theta__4 are free to chose. If I am wrong or you cannot fsolve, please upload.

 

You never defined uNew[0][1] in this loop

and here is a comma too much

By the way, since your indicees are supposedly all integers you could also use an array instead of using tables of tables. Have a look at the variable palette

and also enter this

print(uN[0]);
print(uN[1]);
print(uN[2]);

 

You can reduce time if you are more specific on x and y using assumptions. Otherwise you get a sum of piecewise expressions (below you see the first of 35 summands) that Maple tries to combine to somenthing shorter. This takes time.

To avoid Maple looking for a simplified solution you could do the integration inside the sum of GG[11].
By the way GG[11] looks strange. As you entered it in Math 2D it is the product of A*B*C, where B in the middle is a sum. Is that intended?

That is a very good question.

Some thoughts:

For the case you shared, I think, odetest cannot simplify the residual for some reason. I tried a few commands on the residual and then did something manual. The manipulation below involved a squaring step, which "removes" a
negative sign

A+B=0 ->A=-B -> A^2=B^2 -> which is true/equal.


I interprete the loss of information by the squaring step in a way that the residual can be zero under certain conditions but not in general (depending on assumptions on a). Maybe that is the reason why odetest does not return zero (or there are limitations in algorithmic simplification).

I do not see such a loss of information in the derivation of the "root ode"s. Therefore the solutions of the "root ode"s should be valid for the original ode, because:
It should be possible to work backward from the "root ode's" to the original ode. Each algebraic step generates a new ode. At one point a squaring operation is required where the two branches of the "root ode"s collapse to a single ode (here the information about of the two branches is "lost", i.e. which solution belongs to which branch). If the  solutions of the "root ode"s satisfy the ode's before squaring, the ode after squaring should also be satified by the solutions. (I don't see a reason why squaring an equation compromises equaltiy.) Therefore the solutions of the "root ode"s should be valid for the original ode.


 

Assuming that the residual is zero

((a^2 - 1)*sqrt(a^2 + x^2 - 1)*sqrt((a^4 + a^2*x^2 - 2*a*x*sqrt(a^2 + x^2 - 1) - a^2 + x^2)/(a^2 - 1)^2) - a^3 - a*x^2 + x*sqrt(a^2 + x^2 - 1) + a)/(sqrt(a^2 + x^2 - 1)*(a^2 - 1))=0

((a^2-1)*(a^2+x^2-1)^(1/2)*((a^4+a^2*x^2-2*a*x*(a^2+x^2-1)^(1/2)-a^2+x^2)/(a^2-1)^2)^(1/2)-a^3-a*x^2+(a^2+x^2-1)^(1/2)*x+a)/((a^2+x^2-1)^(1/2)*(a^2-1)) = 0

(1)

NULL

(1)*(a^2 - 1)*sqrt(a^2 + x^2 - 1)

(a^2-1)*(a^2+x^2-1)^(1/2)*((a^4+a^2*x^2-2*a*x*(a^2+x^2-1)^(1/2)-a^2+x^2)/(a^2-1)^2)^(1/2)-a^3-a*x^2+(a^2+x^2-1)^(1/2)*x+a = 0

(2)

add(op(op((2))[1])[2..-1]);

-a^3-a*x^2+(a^2+x^2-1)^(1/2)*x+a

(3)

(2)-(3)

(a^2-1)*(a^2+x^2-1)^(1/2)*((a^4+a^2*x^2-2*a*x*(a^2+x^2-1)^(1/2)-a^2+x^2)/(a^2-1)^2)^(1/2) = a^3+a*x^2-(a^2+x^2-1)^(1/2)*x-a

(4)

(4)^2

(a^2+x^2-1)*(a^4+a^2*x^2-2*a*x*(a^2+x^2-1)^(1/2)-a^2+x^2) = (a^3+a*x^2-(a^2+x^2-1)^(1/2)*x-a)^2

(5)

is(expand((5)))

true

(6)

NULL


 

Download residual.mw

dsolve does not necessarily use in the first place what odeadvisor suggest.

dsolve goes through a lists of methods and stops as soon as a solution is found. In this case dsolve starts with

dsolve(ode,`dsolve/methods`[1, high_degree])

and stops when the method d'Alembert was successfull. The list containing the method "separable" was simply not executed. Maybe it was next in line.

dsolve(ode,`dsolve/methods`[1])

The returned result of "separable" seems to be correct but can be verified only by hand

odetest(sol_2,ode)=0;
map(exp,%);
simplify(%)

Why odeavisor returns only one classification is unclear

DEtools:-odeadvisor(ode,[dAlembert])
                          [_dAlembert]

Maybe its because odeadvisor suggest in this case only the method that Student:-ODEs:-ODESteps uses.

I remember a case you mentionned where two methods where suggested. On this case ODESteps failed.

Because the last two plots are animations. You have to run the animations

 

The document is not editable

To edit check the box.

I cannot give an answer why the global Typesettings are not used inside plots (acer probably can). I assume that the label option simply ignores this.

Here are two manual ways to get the y axis labeled as you want.
 

DEtools:-DEplot([eq1,eq2],[X1(x),X2(x)],x=0..100, 
            X2=-4..4,X1=-4..4, 
            axes=boxed,
            linecolor = red,        
            labels=[y(x),`#mrow(mi("y"),mo("&apos;"),mfenced(mi("x")))`]);

 

DEtools:-DEplot([eq1,eq2],[X1(x),X2(x)],x=0..100, 
            X2=-4..4,X1=-4..4, 
            axes=boxed,
            linecolor = red,        
            labels=[y(x),typeset(y,"'(",x,")")]);

 

You get an indication in this (very interesting case) by giving solve more freedom (by not indicating variables) to search for other solutions or you have to use the "right" variables straight away.

restart

 

eq1 := A__1*(w^2-3*w__0^2)+A__2*w__0^2 = 0 = A__1*(w^2-3*w__0^2)+A__2*w__0^2 = 0NULL

eq2 := A__1*w__0^2+A__2*(w^2-w__0^2) = 0 = A__1*w__0^2+A__2*(w^2-w__0^2) = 0NULL

solve({eq1, eq2}) =
{A__1 = 0, A__2 = 0, w = w, w__0 = w__0}, {A__1 = A__1, A__2 = A__2, w = 0, w__0 = 0}, {A__1 = -A__2*(RootOf(_Z^4-4*_Z^2+2)^2-1), A__2 = A__2, w = RootOf(_Z^4-4*_Z^2+2)*w__0, w__0 = w__0}
NULL

allvalues(%[3])

{A__1 = -A__2*(1-2^(1/2)), A__2 = A__2, w = (2-2^(1/2))^(1/2)*w__0, w__0 = w__0}, {A__1 = -A__2*(1+2^(1/2)), A__2 = A__2, w = (2+2^(1/2))^(1/2)*w__0, w__0 = w__0}, {A__1 = -A__2*(1-2^(1/2)), A__2 = A__2, w = -(2-2^(1/2))^(1/2)*w__0, w__0 = w__0}, {A__1 = -A__2*(1+2^(1/2)), A__2 = A__2, w = -(2+2^(1/2))^(1/2)*w__0, w__0 = w__0}

(1)

Or

allvalues(solve({eq1, eq2}, {A__1, w}))

{A__1 = -A__2*(1-2^(1/2)), w = (2-2^(1/2))^(1/2)*w__0}, {A__1 = -A__2*(1+2^(1/2)), w = (2+2^(1/2))^(1/2)*w__0}, {A__1 = -A__2*(1-2^(1/2)), w = -(2-2^(1/2))^(1/2)*w__0}, {A__1 = -A__2*(1+2^(1/2)), w = -(2+2^(1/2))^(1/2)*w__0}

(2)

 

 

NULL


Download solve-nonzero-solutions_with_solve.mw

2 3 4 5 6 7 8 Last Page 4 of 17