## 20 Reputation

12 years, 339 days

## Using a numerical solution on another fu...

Maple

Hello all

I have a set of differential equations and its numerical solution, for two functions. Here's the worksheet (just a part of it, I don't need the rest)

##########################################

eq1 := diff(W(r), r) = -(1-beta*(W(r)-W0))*(M(r)+4*Pi*r^3*p(r))/(beta*r*(r-2*M(r)));

eq2 := diff(M(r), r) = 4*Pi*r^2*rho(r);

W0 := solve(thetaR = theta0-W0, W0);

r0:=10^(-5);

rf:=10^20;

# ini := evalf({M(r0) = 0, W(r0) = W0});

Maple

Hello all

I have a worksheet where I use a .txt file as input (link in the end). Then, if I try the following command

bettermcproc(10,2*10^5,10^(-6),-60);

it fails, saying it cannot calculate. If, however, instead of using the input file I put it all in the worksheet it works perfectly. I know I could just put it all in the worksheet, but I want to save some space and time, since I use the same input file to do lots of different things.

Thank you all for the help

## Use a maple file as input...

Maple

Hello all

I have a worksheet where I solve numerically a system of differential equations and define a lot of quantities based on the solution. Since I have to plot alot of stuff and make a lot of fits, the worsheet got cluttered and it's not so easy to find what I want anymore (besides, just running the entire thing takes A LONG time). So my question is, can I save the solution and the quantities I defined and use it as a "kernel" for other worksheets, so I can have...

## Assign a range to a fitting variable...

Hello everyone

I'm trying to do a fit for some points using a model function. However, I don't want to use the full range of the independent variable in the model function because I know there will be no fit then. How to assign a range for the fitting variable?

In the case my writing is not clear, here is what I mean:

xdata:=points

ydata:=points

modelfunction:=f(x,parameters)

Fit(f(x,parameters),xdata,ydata,x,rangeofx=r);
I...

## Solving differential equations with para...

Hi everyone.

I have a system of differential equations with some parameters, and I need to numerically solve for several values of these. How can I do it in a simpler way than solving the system everytime declaring different values for the parameters?

And I need plots and quantities depending on the solution of the system.