Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello,
What would be the best and easiest way to approximate an integral or ODE by a mathematical function?
Please see the attached MathCad 15 file.
Thanks,
Anousheh
This may be of help:
But most of all:
Success!
Luc
Hello Luc,
Thanks. Could you please attach the file?
Appreciate this.
Anousheh
You've tripped over the difference between range variables and vectors. You defined a range variable
x:= 0, 0.001, . . 1
That's valid, but x is NOT a vector. (Range variables are mostly used for plotting; there's an undocumented trick that can be used to make them vectors, but it doesn't always give you what you thought.)
So when you typed the first expression for x1, Mathcad told you that x wasn't legal there. (It would have been if x was a vector.) So you created x1(x,m), which is a function and it works. Note that x1(x) would have worked too, since m is single-valued and already defined.
See if the attachment helps. Done in Prime 4, pdf shown
At this point, It's legal to
Hello Fred,
Thank you so much. Great.
G1(x1) is like this:
Can you please plot this too?
Thanks a lot.
Anousheh
Hi,
I calculated the integral, but we must study the function, for x = 1 the integral is complex. See next photo:
Hello MFra,
Thank you so much for your input.
Please let me know how you get:
1- a0(x,m), b0(x,m), etc ?
2- Red marker on the graph at "y axis=1"?
3- how do we know if we have Re and Im functions?
AND
1- How to incorporate x1=(x-m)/(1-m) into G1(x1) as a closed form function?
Thank you again for your help and time,
Anousheh
Hi,
sorry I forgot to add the function F1 (x) to the beginning of the worksheet. Anyway, I attach the complete file. With what is provided, I think you can solve all your problems.
Hi MFra,
Thanks a lot.
Anousheh