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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! 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

1 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

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-)
Top Tags