COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

how to solve symbolic function with initial values

• Follow

```hi,

i have a symbolic equation and i want to solve with initial values which is x=1.2, y=1.2

syms x y;
u = -x^2 + x - y + 0.75;
v = x^2 - 5*x*y - y;

dux=diff(u,x);
duy=diff(u,y);
dvx=diff(v,x);
dvy=diff(v,y);

xi = x - (u*dvy - v*duy)/((dux*dvy)-(duy*dvx))

how to solve xi = ?   initial values are x=1.2 and y =1.2

or

simplify(xi)

6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
how to solve above equation in x=1.2 and y=1.2

thanks a lot.
```
 0

```
"klutch " <klutch52@gmail.com> wrote in message
news:idas9l\$pmo\$1@fred.mathworks.com...
> hi,
>
> i have a symbolic equation and i want to solve with initial values which
> is x=1.2, y=1.2
>
> syms x y;
> u = -x^2 + x - y + 0.75;
> v = x^2 - 5*x*y - y;
>
> dux=diff(u,x);
> duy=diff(u,y);
> dvx=diff(v,x);
> dvy=diff(v,y);
>
> xi = x - (u*dvy - v*duy)/((dux*dvy)-(duy*dvx))
>
> how to solve xi = ?   initial values are x=1.2 and y =1.2

Your use of DIFF and your use of the term "initial values" makes me think
you're trying to solve a differential equation (for which DSOLVE would be
the appropriate tool) but your xi doesn't include any derivative terms, so
I'm not _really_ sure what you're trying to do.  Please reply and clarify

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
http://www.mathworks.com

```
 0

```> Your use of DIFF and your use of the term "initial values" makes me think
> you're trying to solve a differential equation (for which DSOLVE would be
> the appropriate tool) but your xi doesn't include any derivative terms, so
> I'm not _really_ sure what you're trying to do.  Please reply and clarify

i have a function

z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)

now i want to know value of the z(x,y) function where x=1.2 and y=1.2.

z(1.2 , 1.2) = ?

but the function is symbolic, it's not double. how to solve symbolic function in certain value of x, y.

--------
if the func is double, just write like that.

x=1.2;
y=1.2;
z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)

ans=1.5435
```
 0

```"klutch " <klutch52@gmail.com> wrote in message <idb6u9\$cej\$1@fred.mathworks.com>...
> > Your use of DIFF and your use of the term "initial values" makes me think
> > you're trying to solve a differential equation (for which DSOLVE would be
> > the appropriate tool) but your xi doesn't include any derivative terms, so
> > I'm not _really_ sure what you're trying to do.  Please reply and clarify
>
> i have a function
>
> z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
>
> now i want to know value of the z(x,y) function where x=1.2 and y=1.2.
>
> z(1.2 , 1.2) = ?
>
> but the function is symbolic, it's not double. how to solve symbolic function in certain value of x, y.
>
> --------
> if the func is double, just write like that.
>
> x=1.2;
> y=1.2;
> z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
>
> ans=1.5435

%%%%
syms x y

z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1);

subs(z,{x y},{1.2 1.2})
```
 0

```> subs(z,{x y},{1.2 1.2})

thanks a lot. it works :)
```
 0

4 Replies
414 Views

Similiar Articles:

7/26/2012 5:40:59 AM