cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

SYMBOLIC Differential Equation and System of Differential Equation

SOLVED
Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Maybe my reply was done too fast.

It looks like your sheet is working OK despite of the errors noted.

I attach a pdf print of your file after recalculation and after separating the overlapping regions.

Nice work, indeed!

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Ha, that's nice. Thanks for checking.

Now on to, task 2:

I have one implementation in Mathcad 11 that allows:

LucMeekes_1-1600200304455.png

And on the other LODE it returns:

LucMeekes_3-1600200998962.png

So I guess it's done.

Well, almost... I'd like to make sure that the coefficients of the derivatives don't contain the independent variable. Because if they do, you get the wrong answer. Prof. Birkeland's polynome does not account for that, and I'm certain it's not easy to implement support for it..

Example:

LucMeekes_4-1600201181959.png

this is not the solution.

 

In the attached file is a routine GetODEparts, with some examples next to it.

Please check if it runs in Mathcad 15. These are the expected results:

LucMeekes_5-1600201431255.pngLucMeekes_6-1600201440193.png

Thanks,

Luc

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Looks good, here's the pdf

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Thanks!

Does not look good, unfortunately. The result on Page3 does not meet my expectations.

The P1 and P5 values are OK.

The result for F1 should be just sin(x) and should NOT include any (derivative of) y_(x).

Similarly for F5, it should only be exp(tau).

Apparently MuPad, when requested to provide the coefficients for y_(t_), includes the derivatives of y_(t) with the other stuff that's not dependent of y_(t_). Maple doesn't do that:

LucMeekes_0-1600277196415.png

(Where -1 is the coefficient of u(x), and -sin(x) is everything independent of u(x))

Though I must say, I can't blame MuPad for doing that. It may be the correct answer.

But it does mean that it's going to be harder to filter the particular function out of the LODE expression.

Does Mathcad 15 provide for a symbolic lhs() function (That takes the left-hand-segment of an expression, everything that is to the left of := or =  ) and the rhs() function (or symbolic keyword)? If that's the case, it may be possible to supply the LODE as:

LucMeekes_1-1600277471755.png

and do:

LucMeekes_0-1600290619167.png

 

If not, the differential equation solver function will (need to) require that the particular function is supplied as a separate argument (as it does in Prof. Birkeland's function).

 

Luc

 

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

I see the problem and I fear that Mathacd does not provide a LHS or RHS function/operator (similar to numer() and denom()). I would have needed them quite a couple of times when trying to automate the manipulations of an equation.

And you are correct about the working of the coeffs keyword and I, too, think that is correct from a math point of view. On the other hand - its wrong if u(x)=exp(f(x)), for example 🙂
Its not possible to give a correct result without knowing u(x), in fact.

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Now I wonder if this works.

 

Please check attached.

 

Luc

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Clever!

Seems to work OK.
Here's the pdf

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Hello @Werner_E ,

can you please convert the two files to (Mathcad 15) .xmcd files, check if the functions still work, and then attach them in a reply?

 

Thanks!
Luc

 

The final result is posted here:https://community.ptc.com/t5/PTC-Mathcad/Solving-Ordinary-Differential-Equations-symbolically/m-p/68...

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

Fine work! Sure something to keep in ones toolbox.

Find attached the two files converted to MC15 *.xmcd and also the pdf print of the example file.
I had to vertically separate the regions in the LM_... file so they won't overlap.

 

Highlighted

Re: SYMBOLIC Differential Equation and System of Differential Equation

It's done:

LucMeekes_0-1601242519464.png

LucMeekes_1-1601242538317.png

Now neat it up and transport to Mathcad 15.

 

Luc

Announcements