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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

symbolic solve second order differential equations

ptc-5782298
1-Newbie

symbolic solve second order differential equations

Hi all,

I have a system of two coupled second order ODE equations that I would like to solve symbolically. I have checked Mathcad' quicksheet and browsed this forum, but to no avail. Most of the information I find is on numeric solvers. At first glance I though it could be done in matrix form, but then I don't know how to go about.

Is this at all possible? Can someone lend me a hand on this?

Many thanks,

Newin

1 ACCEPTED SOLUTION

Accepted Solutions

Your original Laplace_test contains two dN1's where it should contain one dN1 and one dN2 - see attached.

Alan

View solution in original post

12 REPLIES 12

Mathcad won't solve ODEs analytically in general. You could obtain the Laplace transformed solutions in the s-domain ok, but I think the result is too complicated to stand any chance of being inverse transformed back to the time domain analytically.

Is there a good reason for wanting a symbolicl, rather than a numerical solution?

Alan

Hi Alan,

It is just for my own preference that I like to see how the solution changes as I modify the terms in the coupled equations, i.e. adding external forces, or removing some of the terms.

I am working now to solve it numerically and will report back how it goes.

Newin

Hi Alan,

I have started with the numeric solver, but it is far from complete. Attached is the worksheet, where I include alongside the code some explanation of what I need to get done. As I said, this is far from complete and I am working on it, but just thought that you could have a look if you have the time.

The tricky parts for me is firstly, the coupled equation that I need to get two uncoupled equations and then solve each of them separately, and secondly, that I would like to do some further processing on the results, such as integration or plotting the results against some other variables that is not the variable used in the derivatives.

Any help would be appreciated!

Newin

The attached shows a more direct way of solving the equations numerically.

Alan

Dear Alan,

Could you have a look at the attached? I worked on your sheet trying to plot a Fourier transform on the results of ODE calculation.

Newin

You are mixing up numeric and symbolic approach!

v1 is a numerically derive function defined only for t in the range of 0 to t.end and so will be P(t). So you cannot take an indefinte integral of P(t) but just a definite one and you have to stay in the range 0..t.end with t.

Furthermore is P(t) defined using a constant value of omega.s. If you want to make omega variable later, you have to define P as dependent on t and omega.

Hi Werner,

Thanks Werner. Yes, I think that's my problem, unfortunately. I will do as you suggested regarding including w.s as another dependent variable.

Upon getting p(t), I would need to do FT (I suppose). Do you have any suggestions as to how I could do FT on those numeric output? or is this possible at all?

Newin

Don't know if the attached helps or hinders!

Alan

Many thanks Alan. That indeed helps a lot!

Hi Alan,

I have been working with Laplace transform of the original coupled second order differential equations. However, I have been trying for several days now but still could not get the same plot as that solved numerically by ODE. Attached are the two worksheets comparing Laplace and ODE. Could you have a look what I might have done wrong?

The example equations are simple enough and all the parameters have the same names so it should be straightforward to compare between the two files.

Best regards,

Newin

Your original Laplace_test contains two dN1's where it should contain one dN1 and one dN2 - see attached.

Alan

ah, that's so obvious, how could I not see it! Many thanks Alan!

Top Tags