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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to solve this eq with odesolve?

Cornel
18-Opal

How to solve this eq with odesolve?

Hi,

How to solve for V2(t)?

Cornel_0-1718026917660.png

1 ACCEPTED SOLUTION

Accepted Solutions

@Werner_E @ttokoro 
I did not found yet why Untitled-4_MCP10 do not work with laplace, maybe you can have a look.

Cornel_3-1718104953027.png

 


But I found a way how to do also with odesolve by making more rearrangements....

Cornel_2-1718105462237.png

Cornel_1-1718105351082.png

View solution in original post

20 REPLIES 20

@Werner_E  this to be the only solution, to differentiate in order to escape from integral? 

 

Below solution is for this circuit:

Cornel_0-1718028611370.png

 

Cornel_0-1718027496933.png

Cornel_1-1718027503661.png

Cornel_2-1718027509951.png

@Werner_E @ttokoro 
Below is for this circuit: I was expected that odesolve to be able to solve also this simple circuit...differential eq...

Cornel_1-1718028729903.png

Cornel_2-1718028780265.png

Ok, I found...
@Werner_E  do you think that is this normal behaviour of solveblock? I mean to arrange V2'(t) like below in order solveblock to be able to solve this differential eq?  In first above case why odesolve block is not able to solve?

Cornel_0-1718029013142.png

Cornel_1-1718029103276.png

 

Now below is for this circuit: so, the conclusion to be that odesolve block is to primitive?

Cornel_0-1718029971656.png

Cornel_1-1718029986104.png

 

And even this variant seems to fail..
From this eq:

Cornel_0-1718030859290.png

Solve for V2'(t):

Cornel_1-1718030883666.png

Cornel_0-1718031037185.png

Then introduce in first eq:

Cornel_2-1718030896592.png

Cornel_3-1718030903173.png

 

Then differentiate again..

Cornel_4-1718030926742.png

Then odesolve block fail..

Cornel_5-1718030951386.png

So, I am lost...

Werner_E
24-Ruby V
(To:Cornel)

I have not checked in detail how you derived this equation, but it sure is not correct as you have a lot of unit mismatches:

Werner_E_0-1718034202297.png

Just noticed that there is already an error in your first step:

Werner_E_2-1718034534730.png

 

 

Yeah, I see:
if there are no more mistakes, this should be it:

Cornel_0-1718035343782.png

But anyway, this not solve the problem..

Werner_E
24-Ruby V
(To:Cornel)

Sometimes, as you found out yourself in another of your various postings, it helps to collect the summands with the highest order derivative and reorder the terms so its on the left hand side of the equation. But there is not guarantee that his would help in your case, too.

 

EDIT: Your new ODE is now only of second degree and rearranging/simplifying the equation seems to help (you have to check if the simplification done by me is correct)

Werner_E_0-1718036218740.png

 

Ok, I will look tomorrow (as right now it's night at me). It seems all right.

But anyway, this with the fact that ode needs to be rearranged inside odesolve block in the hope that one will find the correct rearrangement and thus odesolve can work/calculate/solve the ode this way is not very nice..

What one will you do if he will not find the correct order of the terms in the ode?

 

Let's also see if @ttokoro will come also with an answer based on laplace transform or odesolve for this circuit with R1, L1, C1 and R2...

Werner_E
24-Ruby V
(To:Cornel)


@Cornel wrote:

What one will you do if he will not find the correct order of the terms in the ode?

Cry and weep! Or use Laplace, or simulate, or try a different more capable Math software, or ...
But it seems to be a rule that you should not use  ".... a* y''(x) + ..... + b* y''(x)+-----" but rather ".... (a+b)*y''(x)+.....". Something we can remember.

 

But I guess that Laplace is the way to go here, (if the input voltage function V1(t) is not too nasty) but it was you who demanded just to use odesolve! 🙂

I hoped there wouldn't be so many problems with odesolve block. odesolve block seems more general. for example, if we add a diode to these circuits (which will probably be one of the future topics) then you can say goodbye to laplace, and should rely more on something like odesolve block...

These posted circuits are examples to test odesolve block, but it seems that odesolve block stuck and sucks and has problems, it is not that capable.

ttokoro
20-Turquoise
(To:Cornel)

image.png

You don't have to get rid of the units if you are solving with Laplace, but you would have to check "Units/Constants in Symbolics" in the calculation option and explicitely state ",s,t" (labelled as variables!) when you use "invlaplace".

The results are too large to be displayed (because the symbolics can't simplify the various units involved) but can be used numerically without problems. See attached file.

 

What am I missing here?

Cornel_0-1718095265895.png

 

I had enabled:

Cornel_1-1718095284463.png

Though I see that units are labeled as variables...

Cornel_2-1718095298626.png

ttokoro
20-Turquoise
(To:Cornel)

image.pngimage.pngimage.png

Img cannot help me as I have one mathcad file where I can see that you see, that your picture is showing...Werner and you posted already such a file above.
What I did, was to copy this part from below to another mathcad sheet...and I saw that calculation does not work anymore...and I am wondering why. I had enabled already Units/Constant in Symbolic...but without seeing any change in the calculation

Cornel_0-1718098813401.png

 

@Werner_E  look at this:

Cornel_0-1718099942392.png

This V3(t) result is with above odesolve block:

Cornel_1-1718099950522.png

 

And this is with laplace made by ttokoro:

Cornel_2-1718099972328.png

 

The correct answer is this with laplace, but I am wondering why odesolve block did not output the same result as laplace as the derived eq within odesole block of what we did yesterday seems also correct...

 

 

@Werner_E @ttokoro 
I did not found yet why Untitled-4_MCP10 do not work with laplace, maybe you can have a look.

Cornel_3-1718104953027.png

 


But I found a way how to do also with odesolve by making more rearrangements....

Cornel_2-1718105462237.png

Cornel_1-1718105351082.png

Werner_E
24-Ruby V
(To:Cornel)


@Cornel wrote:

@Werner_E @ttokoro 
I did not found yet why Untitled-4_MCP10 do not work with laplace, maybe you can have a look.


Let the sheet recalculate and it works OK.

The changes to the Calc Options only become active after the entire worksheet has been recalculated.

Werner_E
24-Ruby V
(To:Cornel)

Looks like Prime is not as capable as we would like it to be.

You may consider contacting PTC support and hope for the best in future versions of Prime.

 

BTW, the unit of the derivatives is not Volt. It seems to do not matter as long as the value is zero and fixing this does not help in any way to get a solution.

Top Tags