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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Solving ODE

ptc-4011164
1-Visitor

Solving ODE

I am trying to solve the following ODE;

mx''(t) + cx'(t) + kx(t) = f(t) I already defined my function beforehand.

for x(t)=0 and x'(t)=0

Then I am trying to form the solve block by Given,

But, after I write Given, x''(t) seems still red, undefined.

Given

mx''(t) + cx'(t) + kx(t) = f(t) %%Should x''(t) be red here?

x(t)=0

x'(t)=0

x:= Odesolve(t,5)

what is wrong?

Thanks in advance..

ACCEPTED SOLUTION

Accepted Solutions

mahmut akça wrote:

I am trying to solve the following ODE;

mx''(t) + cx'(t) + kx(t) = f(t) I already defined my function beforehand.

for x(t)=0 and x'(t)=0

Then I am trying to form the solve block by Given,

But, after I write Given, x''(t) seems still red, undefined.

Given

mx''(t) + cx'(t) + kx(t) = f(t) %%Should x''(t) be red here?

x(t)=0

x'(t)=0

x:= Odesolve(t,5)

what is wrong?

Thanks in advance..

Your initial conditions should be x(0) = 0, not x(t) = 0.

View solution in original post

4 REPLIES 4

mahmut akça wrote:

I am trying to solve the following ODE;

mx''(t) + cx'(t) + kx(t) = f(t) I already defined my function beforehand.

for x(t)=0 and x'(t)=0

Then I am trying to form the solve block by Given,

But, after I write Given, x''(t) seems still red, undefined.

Given

mx''(t) + cx'(t) + kx(t) = f(t) %%Should x''(t) be red here?

x(t)=0

x'(t)=0

x:= Odesolve(t,5)

what is wrong?

Thanks in advance..

Your initial conditions should be x(0) = 0, not x(t) = 0.

Thanks sir, but I wrote it here in the wrong way. Actual problem is not that.

I just saw your attachment. Now it works.

I still don't know where I did wrong with that "Given".

Thanks a lot,

mahmut akça wrote:

...I still don't know where I did wrong with that "Given"...

It was necessary to attach a Mathcad file.

Announcements

Top Tags