![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
By whatever numerical means you prefer in Excel, fin any and all values of x for which the following tow functions f(x) and g(x) are equal to at least eight decimal places of accuracy:
f(x) = x^3 + .25x^4 g(x) = x + 2x*cos(x^2) This is my problem, if anyone could give me some ideas to help me out i would appreciate it very much. [ This Message was edited by: jacamar21 on 2002-05-19 12:12 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
f(x) = x^3 + .25x^4
g(x) = x + 2x*cos(x^2) x^3 + .25x^4 = x + 2x*cos(x^2) x=0 -8*cos(x^2)+x^3+4*x^2-4=0 Insert that into a speadsheet and name a cell x Now you use GoalSeek from the tools menu and let that set the cell with the formula to zero by changing the cell named x My result -0,000668646 Sorry I was too quick writing regards Tommy (no garantee) [ This Message was edited by: Tommy Bak on 2002-05-19 14:47 ] [ This Message was edited by: Tommy Bak on 2002-05-19 15:18 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Quote:
1. Graph the functions to get a rough estimate where they intersect. 2. Use Goal Seek as Tommy suggested to refine the answer. 3. Fix this UDF!!! a) solve for x on one side of the equation x = x^3 + .25*x^4 - 2*x*cos(x^2) Type the right hand equation in a cell exactly as you see it. call the following function SolveEquation(Cell from above)
If this converges from your initial guess, great. If not, I don't know how to anneal it and will need some help. So, this is not ready for prime time, but it may give you or others some insight in fixing this. This same idea, if fixed, will apply to your Secant Method post as well. The advantage is that you can write a function almost exactly as you would on paper -- with explicit math operators -- and this will evaluate to the correct number. Bye, Jay [ This Message was edited by: Jay Petrulis on 2002-05-20 17:50 ] |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|