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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

need solution for piece wise differential equation in matcad

nkhadar
6-Contributor

need solution for piece wise differential equation in matcad

Hello, I'm Mathcad newbie and I am unable to solve the attached problem in mathcad. 

how to plot voltage vs df/dt and voltage vs f

ACCEPTED SOLUTION

Accepted Solutions
-MFra-
21-Topaz II
(To:-MFra-)

The for loop begins from j=1 not 0:

RK4.jpg

View solution in original post

8 REPLIES 8

Attached is how to do it; but I don't like the result. . .

LucMeekes
23-Emerald III
(To:nkhadar)

This may be a start. (Note, a value for Vo is needed, I just put in 2).

LM_20180507_Piecewise1.png

This is your df/dVin. Note that it is discontinuous!

Then you find f by simple integration:

LM_20180507_Piecewise2.png

So now you have the function f(Vin...), You can put in any value, or function, for Vin.

 

Success!
Luc

That's great!

 

Plot f(t) vs t  ??

-MFra-
21-Topaz II
(To:nkhadar)

Hi,

I've used the fourth order Runge-Kutta method, the result is below depicted:

answer for nkhadar.jpg

Werner_E
25-Diamond I
(To:nkhadar)

You could define the function that way

B1.png

But it would be the same as

B2.png

-MFra-
21-Topaz II
(To:nkhadar)

Hi, nhkadar,

I can give you an image:

RK4 for nkhadar.jpg

-MFra-
21-Topaz II
(To:-MFra-)

The for loop begins from j=1 not 0:

RK4.jpg

LucMeekes
23-Emerald III
(To:-MFra-)
Announcements

Top Tags