Skip to main content
1-Visitor
May 7, 2018
Solved

need solution for piece wise differential equation in matcad

  • May 7, 2018
  • 5 replies
  • 3692 views

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

Best answer by -MFra-

The for loop begins from j=1 not 0:

RK4.jpg

5 replies

23-Emerald I
May 7, 2018

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

23-Emerald IV
May 7, 2018

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

23-Emerald I
May 7, 2018

That's great!

 

Plot f(t) vs t  ??

21-Topaz II
May 7, 2018

Hi,

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

answer for nkhadar.jpg

25-Diamond I
May 8, 2018

You could define the function that way

B1.png

But it would be the same as

B2.png

21-Topaz II
May 8, 2018

Hi, nhkadar,

I can give you an image:

RK4 for nkhadar.jpg

-MFra-21-Topaz IIAnswer
21-Topaz II
May 11, 2018

The for loop begins from j=1 not 0:

RK4.jpg

23-Emerald IV
May 11, 2018