Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to join two functions' topicStudent Support Forum > General > Archives > "How to join two functions"

Help | Reply To Topic
Author Comment/Response
Solidus
05/26/08 12:16pm

Hello. I've created two functions in mathematica that I want to join, but I don't know how. Here's the code:

[code]
h = 0.01
rcxi = 2
rcyi = 3
vc = 1
fx[t_, rcx_, rcy_] :=
vc*(Cos[t] - rcx)/(Sqrt[(Cos[t] - rcx)^2 + (Sin[t] - rcy)^2])
fy[t_, rcy_, rcx_] :=
vc*(Sin[t] - rcy)/(Sqrt[(Cos[t] - rcx)^2 + (Sin[t] - rcy)^2])
\[Delta]x = h*fx[ti, rcxi, rcyi]
\[Delta]y = h*fy[ti, rcyi, rcxi]
rx[ti_] :=
h*fx[ti + 1/2*h, rcxi + 1/2*\[Delta]x, rcyi + 1/2*\[Delta]y] + rcxi
ry[ti_] :=
h*fy[ti + 1/2*h, rcyi + 1/2*\[Delta]y, rcxi + 1/2*\[Delta]x] + rcyi
g = Plot[rx[ti], {ti, 0, 10}]
h = Plot[ry[ti], {ti, 0, 10}][/code]

I want to join the fuctions g with h, creating a plot with x and y, for a given ti.

URL: ,
Help | Reply To Topic