- #1

- 103

- 0

First of all, I am not trying to "spam" subforums. I found out that my thread shouldn't be posted under homework. Anyways, here it is.

*Integration*Let say there's a polynomial, 5x+6 and you want to integrate from 0 to 3 respect to x, how do you input in MATLAB? (I guess you can't figure out the constant once you integrate it since you don't have initial conditions. Ignore that constant part unless it's needed to execute the command.)

My major problem is that the MATLAB doesn't want to execute anything unless I specify x prior to that, which means it doesn't want to work in variable forms.

Bottomline, I want that equation integrated from 0 to 3 and substitute 100 into x to obtain value.

*Derivative*Same as above, if I want to take a derivative of (x^2)+6 where x=2, what do I need to input in MATLAB?

I've tried integrate, int, diff, and many other commands that I found under MATLAB but it doesn't do what I want it to do. (diff basically takes the difference but one source told me that it's for derivative.)

Thanks!