Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

derivatives and integrals

45 views
Skip to first unread message

NHB

unread,
Mar 19, 2000, 3:00:00 AM3/19/00
to

Is there any way to include these in an excel spreadsheet. If so I would
imagine you'd have to write the code elsewhere and call it. Is there an easy
way to do this???

For example given f(x) =x^2 entered in cell B1
Now I want the derivative of cell B1 to be calculated and seen in cell B2
which is 2x

Is there any way to do this


-
Chris

***********************************************************************
SDSU Mechanical Engineering
American Society of Mechanical Engineers
Audio Engineering Society
http://members.home.com/cspangle/MechanicalEngineering.htm
cspa...@home.com
***********************************************************************
_______________________________________________


Stan Blank

unread,
Mar 19, 2000, 3:00:00 AM3/19/00
to
Numerical solutions to derivatives and integrals would not be too difficult
to code in VBA (although they might be slow). If you are wanting symbolic
derivatives and antiderivatives AND you have access to Mathematica and
MathLink, you could probably link to the Mathematica Kernel. Symbolic
calculus would definitely NOT be easy to accomplish in Excel and VBA alone
except for a few very trivial cases (unless you are a coding wizard like
some who inhabit this newsgroup).

Best wishes.....

Stan

NHB <cspa...@home.com> wrote in message
news:BkYA4.57843$8k3.5...@news1.rdc1.sdca.home.com...

NHB

unread,
Mar 19, 2000, 3:00:00 AM3/19/00
to
I am trying to find an integral using Guass-Quadrature methods. I suppose I
could at numerical methods to find derivatives as well.

Thanks

"Stan Blank" <sbl...@accessus.net> wrote in message
news:95344344...@news.accessus.net...

Tushar Mehta

unread,
Mar 21, 2000, 3:00:00 AM3/21/00
to
[This followup was posted to microsoft.public.excel.programming and a
courtesy email copy was sent to NHB <cspa...@home.com>. Please use the
newsgroup for further discussion.]

I don't know if you are picky about the method the method but...

A long time ago (middle of last year?) Dave Braden posted some code for
cubic spline fit, differentiation, and integration. I haven't looked at
it so I can't tell you if it's good, bad, or ugly. You should find it
through deja.com

--
Regards,

Tushar Mehta
www.tushar-mehta.com
--
In <l30B4.59722$8k3.5...@news1.rdc1.sdca.home.com>, NHB
<cspa...@home.com> wrote

David J. Braden

unread,
Mar 21, 2000, 3:00:00 AM3/21/00
to
It's good... took a while to do (sadly; aging takes a toll).

-Dave

David J. Braden

unread,
Mar 21, 2000, 3:00:00 AM3/21/00
to
NHB-
As Tushar would put it, I also posted "a long time ago" code for symbolic
differentiation and integration of polynomials. I like Stans's suggestions a lot
for more general stuff; The code I posted that Tushar refers to was to
differentiate, and integrate, the chart XL graphs for smoothed XY graphs.
Obviously a very different problem from what you first intimated.

So, are you looking for a symbolic solution, or a numerical one? Smoothing?
Data driven? If so, from a Bayesian perspective, or what?

Dave Braden

NHB

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
Im doing numerical solutions. I've already wrote one application to
calculate an itegral using the trapezoidal rule, simpson's (1/3) rule and
the Guass Qaudeature method. My next task will be to write an application
that solves an initial value problem1st order and higher order differential
equation, using Runge Kutta methods.

I was initially interested in getting a derivative when I was working with
Newton Raphson methods. This carried over into gauss quadrature.

"David J. Braden" <bra...@rochester.rr.com> wrote in message
news:38D7CC4B...@rochester.rr.com...

c...@iris8.cici.ohiou.edu

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
For derivatives, numerically, the simplest way is to do in
spreadsheet. If you only have Y values, the numerical derivative will
the difference between two adjacent points. If you have X also, then
the difference of Y should be devided by the difference of X.

If your Y appears noisy, you may try Savitzky-Golay method, it is
relatively easy to program in VBA (you can pre-calculate the
coefficients and store them in a hidden workbook. This was the way I
did). HTH. Chun


Sent via Deja.com http://www.deja.com/
Before you buy.

David J. Braden

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
NHB,
Now I'm confused even more. What is it you seek to accomplish?

Dave Braden

Tushar Mehta

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
[This followup was posted to microsoft.public.excel.programming and a courtesy
email copy was sent to NHB <cspa...@home.com>. Please use the newsgroup for
further discussion.]

If all you want is the numerical derivative, and you are willing to 'clean up'
an intermediate result, download the Plot Manager program from my web site.
It's primary function is to plot a function. However, in doing so it computes
the first and second derivatives. All the values (x, y, y', and y'') are saved
in a worksheet that is added to the workbook.

For symbolic math, I would go with Mathematica or Maple.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
--
In <4qeC4.70467$8k3.6...@news1.rdc1.sdca.home.com>, NHB <cspa...@home.com>
wrote
> I'm sorry, I'm even confusing myself now.
>
> I need to have a user enter a x value(s) in a cell(s) [4 in cell A1].
>
> The the user will enter a function with a variable in a cell [f(x) = x^2
> in cell A2].
>
> I then want the derivative of the input to be viewed in another cell [2x in
> cell A3].
>
> And finally the solution(s) will appear in another cell(s) [8 in cell A4].
>
> I'm not sure this is really possible with Excel, so I'm probably just
> wasting your time. Just tell me to go play with MathCad or Matlab.
>
> Thanks for trying to make sense of my yammering anyway. I also know
> someone's going to ask why don't you just multiple cell A1 by 2 in cell
> A2..this is beside the point.
>
> Chris


>
> "David J. Braden" <bra...@rochester.rr.com> wrote in message

> news:38D92923...@rochester.rr.com...

NHB

unread,
Mar 23, 2000, 3:00:00 AM3/23/00
to
0 new messages