## 15 Reputation

0 years, 192 days

## @Rouben Rostamian  Applying your su...

```restart;
with(Physics);
vars := f(x);
sys_ode := diff(xhat(vars), f(x)) = a_1 + a_3*x, diff(yhat(vars), f(x)) = a_2 - a_4*y + f(x), diff(uhat(vars), f(x)) = a_3*u + (2*u)*a_4, diff(vhat(vars), f(x)) = a_4*v + u*diff(f(x), x);

initvars := 0;
ics := xhat(initvars) = x, yhat(initvars) = y, uhat(initvars) = u, vhat(initvars) = v;

dsolve({ics, eval(sys_ode)}, [xhat(f(x)), yhat(f(x)), uhat(f(x)), vhat(f(x))]);

Error, (in dsolve) found the following equations not depending on the unknowns of the input system:
{uhat(0) = u, vhat(0) = v, xhat(0) = x, yhat(0) = y,
(D(uhat))(f(x)) = a_3*u+2*a_4*u,
(D(vhat))(f(x)) = a_4*v+u*(diff(f(x), x)),
(D(xhat))(f(x)) = a_3*x+a_1,
(D(yhat))(f(x)) = a_2-a_4*y+f(x)}
```

If I dont charge the module physics then I cannot go futher than

```vars := f(x);
sys_ode := diff(xhat(vars), f(x)) = a_1 + a_3*x, diff(yhat(vars), f(x)) = a_2 - a_4*y + f(x), diff(uhat(vars), f(x)) = a_3*u + (2*u)*a_4, diff(vhat(vars), f(x)) = a_4*v + u*diff(f(x), x);```

as I get

```Error, invalid input: diff received f(x), which is not valid for its 2nd argument
```

Any idea on how to do ?

Cheers,

Can

## @Rouben Rostamian  Thank you for yo...

Is there a reason for looking at xhat as a function of all those variables?  Why not take xhat to be a function of a_1 only.  The solution will involve the remaining variables as parameters.

Yes, along the example given before, I was also trying to solve the following with maple:

```with(Physics);
vars := x, y, u, v, a_1, a_2, a_3, a_4, f(x);
sys_ode := diff(xhat(vars), f(x)) = a_1 + a_3*x, diff(yhat(vars), f(x)) = a_2 - a_4*y + f(x), diff(uhat(vars), f(x)) = a_3*u + (2*u)*a_4, diff(vhat(vars), f(x)) = a_4*v + u*diff(f(x), x);
vars := x, y, u, v, a_1, a_2, a_3, a_4, f(x)
initvars := x, y, u, v, a_1, a_2, a_3, a_4, 0;
ics := xhat(initvars) = x, yhat(initvars) = y, uhat(initvars) = u, vhat(initvars) = v;
dsolve({ics, eval(sys_ode)}, [xhat, yhat, uhat, vhat]);```

it's an ode with respect to f(x) treaten as a derivative variable but f(x) and its diff(f,x) (its  derivative with respect to x) appears also on the RHS.

The derivative with respect to f(x) is writen as D_9 (as it differentiates with respect to the 9th argument of the variable-list) and does not match the argument f(x) that dsolve seems to be looking for. Hence (I guess) the error:

```Error, (in dsolve) found the following equations not depending on the unknowns of the input system:
{uhat(x, y, u, v, a_1, a_2, a_3, a_4, 0) = u,
vhat(x, y, u, v, a_1, a_2, a_3, a_4, 0) = v,
xhat(x, y, u, v, a_1, a_2, a_3, a_4, 0) = x,
yhat(x, y, u, v, a_1, a_2, a_3, a_4, 0) = y,
(D[9](uhat))(x, y, u, v, a_1, a_2, a_3, a_4, f(x)) = a_3*u+2*a_4*u,
(D[9](vhat))(x, y, u, v, a_1, a_2, a_3, a_4, f(x)) = a_4*v+(diff(f(x), x))*u,
(D[9](xhat))(x, y, u, v, a_1, a_2, a_3, a_4, f(x)) = a_3*x+a_1,
(D[9](yhat))(x, y, u, v, a_1, a_2, a_3, a_4, f(x)) = a_2-a_4*y+f(x)}
```

 Page 1 of 1
﻿